HI guys
Can I pass multiple photos like below and then pull them
<form method="post" action="addgallery.php" enctype="multipart/form-data">
<h3>Add Event</h3>
<table cellspacing=15>
<?
$arr = array(1, 2, 3, 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25);
foreach ($arr as &$value) {
$value = $value * 2;
?>
<tr><td>Photo</td><td><input type=file size=60 name=photo[]><br /><br /></td></tr>
<? } ?>
<tr><td></td><td><input type=submit name=submit value="Add Gallery"></td></tr>
</textarea>
</table>
</form>
Then when the form is submitted I try to call it like this but it is not working.
$photo = stripslashes($_POST[photo][name]);
echo"$photo / ";
if($photo!='') {
foreach($_POST['photo'] as $key=>$team_id){
$filename = $_POST['photo'][$key];
if($_FILES['photo']['name']!=''){
$photo=$_FILES['photo']['name'];
$phototmp=$_FILES['photo']['tmp_name'];
upload_file();
}