Tell me how to upload a few pictures to the server and to the database. I didn’t get the code below, tell me how to fix the code so that you can upload some pictures. I load the file paths into the Base, the format is something like /i/ picture_name.jpg 1) In the database there are two fields id (int 10 A_U) and name (varchar 255). form code
<form id="form2" name="upload" action="exit.php" method="POST" ENCTYPE="multipart/form-data"> Выберите файл для загрузки: <input type="file" name="userfile[]" multiple accept="image/*" > <input type="submit" name="upload" value="Загрузить"> </form> derived array
if(isset($_POST['upload'])) { ?><pre><?print_r ($_FILES['userfile']['name']);?></pre> <? } got this look
Array ( [0] => nRLOalVq36k.jpg [1] => t1.jpg [2] => t2.jpg )