Hi Guys,
I been googling every where to find some code sample that will enable me to upload multiple photos from an iphone running IOS 6 to a website. According to what I had read, Safari for IOS supports this by using a mutiple boolean value in an input tag. And that works fine. When the button is pressed to select pictures I am able to select multiple pictures, what I can't seem to figure out is how on the server side I can grab those multiple images selected. Here is code sample( I found online not mine) that I was able to use . And it works fine with 1 image; I can upload the image. But with 2 or more I can't seem to figure out how to make it happen. Thank you.
<?php
$result=0;
if (trim($_POST["action"]) == "Upload File") { //**** User Clicked the Upload File Button
//*********** Execute the Following Code to Upload File *************
$imagename = basename($_FILES['image_file']['name']); // grab name of file
$result = @move_uploaded_file($_FILES['image_file']['tmp_name'], $imagename); // upload it
if ($result==1) echo("Successfully uploaded: <b>".$imagename."</b>"); // did it work?
} // end if
?>
<html>
<head>
<title>Upload file script</title>
</head>
<body>
<form method='POST' enctype='multipart/form-data' name='frmmain' action='up2.php'>
Browse for Image (jpg): <input type="file" name="image_file" size="35">
<br>
<input type="submit" value=" Upload File " name="action" multiple>
</form>
<br>
<?php
if ($result==1) echo("<img src='".$imagename."'>"); // display the uploaded file
?>
</body>
</html>
Can any one help me figure out how I can make this happen?