Thank you in advance for your help
Thanks to IOS 6 we can now upload photos straight from the iphone using either "Take Photo" or "Choose Existing"
"Choose Existing" is fine however when we select "take a photo" the upload fails.
We are using a standard html form that we have used for years. Could it be that the when we take a picture it is has no filename and this is causing the problem?
<form action=thankyou.php method=post enctype="multipart/form-data">
<input type=file name="photo1" id="message" placeholder="" class="required" accept="image/*" capture>
<input type=submit name=submit value="send feedback">
$target = "photos/";
$target = $target . basename( $_FILES['photo1']['name']) ;
//This is our size condition
if ($uploaded_size > 350000)
echo "Your file is too large.<br>";
//This is our limit file type condition
if ($uploaded_type =="text/php")
echo "No PHP files<br>";
//Here we check that $ok was not set to 0 by an error
//If everything is ok we try to upload it
If that's your complete form php code, it's extremely insecure - it'd be trivial to upload a malicious file.
It is purely for testing at the moment which is why it is basic, is their a reason why it would work on the web and not on IOS?
This topic is now closed. New replies are no longer allowed.