i am trying to do multiple photo upload but its not working,i can just upload just one image at a time
here is my code.I am looking for uploading multiple image using multiple file input type and a single submit button.

<form action="imgupsuc.php" method="post" enctype="multipart/form-data">
<input type=hidden name=n1  value=<?php echo $nm ?>>
Select a picture<input type="file" name="file" size="50">
Select a picture<input type="file" name="file" size="50"><input type="submit" value="upload">



    include "connect.php";
    $q="insert into image values('".$name."','".$_SESSION['userid']."".$_FILES['file']['name']."','".$_SESSION['userid']."')";
        echo "<h1> pic insert successfully";
?><li>Go Back to Choose another photo to upload</li><b>or</b>
<a href="view.php">View Album</a>Or <a href="fileup.php"> Upload Another Image</a>

Recommended Answers

All 2 Replies

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.