Note that there are some explanatory texts on larger screens.

plurals
  1. POMultiple Upload using CTRL Key PHP
    primarykey
    data
    text
    <p>would you help for my code , i need to do the multiple upload but i cant so will you help me please. i need so bad.</p> <pre><code>here's my code </code></pre> <p>i made multiple upload the form but it is not working. the output is "error array" //HTML</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;form name="Image" enctype="multipart/form-data" action="upload.php" method="POST"&gt; &lt;h1&gt;&lt;font face="tahoma"&gt; UPLOAD FILES&lt;/h1&gt; &lt;label for="file"&gt;Filename:&lt;/label&gt; &lt;input type="file" name="Photo[]" accept="image/*" multiple="multiple"/&gt;&lt;br/&gt;&lt;br/&gt; &lt;input type="hidden" id="pageName" name="pageName"&gt; &lt;script type="text/javascript"&gt; //get page name from parent var value = window.opener.pageName document.getElementById("pageName").value = value; &lt;/script&gt; &lt;INPUT type="submit" class="button" name="Submit" value=" Upload "&gt; &lt;INPUT type="reset" class="button" value="Cancel"&gt;&lt;br/&gt;&lt;br/&gt; &lt;/form&gt; &lt;/head&gt; &lt;/html&gt; //PHP this is were upload is do. &lt;?php include('global.php'); ?&gt; &lt;? $uploadDir = 'directory/'; //Image Upload Folder if(isset($_POST['Submit'])) { $fileName = $_FILES['Photo']['name'][0]; $fileName1 = $_FILES['Photo']['name'][1]; $tmpName = $_FILES['Photo']['tmp_name']; $fileSize = $_FILES['Photo']['size']; $fileType = $_FILES['Photo']['type']; $filePath = $uploadDir . $fileName . $fileName1; //upload error if ($_FILES["Photo"]["error"] &gt; 0) { echo "Error: " . $_FILES["Photo"]["error"] . "&lt;br /&gt;"; } //photo already exixts else //insert image into DB { move_uploaded_file($tmpName, $filePath); $filePath = addslashes($filePath); $filePath = stripslashes($filePath); $filePath = mysql_real_escape_string($filePath); $query = "INSERT INTO images (image , category ) VALUES ('$filePath', '$pageName')"; mysql_query($query) or die('Error, query failed'); echo" Upload Successful. &lt;br/&gt; &lt;br/&gt;"; echo "Stored in: " . "directory/" . $_FILES["Photo"]["name"]; ?&gt; &lt;br/&gt;&lt;br/&gt; &lt;img width="300" height="400" src="directory /&lt;?=$_FILES["Photo"]["name"]?&gt;"&gt;&lt;br/&gt; &lt;? } } ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload