Hello everyone, i am new here so if this is posted in the wrong spot I do apologize.

Anyways, I made a website for some friends of mine for their Gym. I made it so that they can upload the new workout of the day on their website with PHP/MySQL. The whole site works fine for the most part, however, when the user uploads the new workout from his Iphone, it will allow him to add the new workout, but it will not add the image that he selects to upload Instead it just gives you generic small red 'X' instead of the image. The image upload works fine from any computer and so far it works fine on any browser I have tested it on. Is there something special I would need to do to make the image upload from an Iphone?

Here is my code for the portion: Also, I know that there is no security for the upload or any decent re sizing , but I have followed several image re size and security tutorials and am unable to understand them.

Any help help would be greatly appreciated. I thank you all for your time.

PHP Code:
include 'core/init.php';
header("Location: wod_admin.php");

* this function will get the name of a file
* for Instance if the file is image14.jpg 
* only image14 will be returned.

BY wilson382

$name $_FILES['myfile']['name'];
$tmp_name $_FILES['myfile']['tmp_name'];
$location "images/wod/$name";
$_month mysql_real_escape_string($_POST['month']);
$_day mysql_real_escape_string($_POST['day']);
$_year mysql_real_escape_string($_POST['year']);
$_name mysql_real_escape_string($_POST['name']);
$_w1 mysql_real_escape_string($_POST['w1']);
$_w2 mysql_real_escape_string($_POST['w2']);
$_w3 mysql_real_escape_string($_POST['w3']);
$_w4 mysql_real_escape_string($_POST['w4']);
$_w5 mysql_real_escape_string($_POST['w5']);
$_w6 mysql_real_escape_string($_POST['w6']);
$_comment mysql_real_escape_string($_POST['comment']);

// select all rows that are not the top 4
$sql mysql_query("SELECT * FROM `wod` WHERE `id` NOT IN (SELECT * FROM (SELECT `id` FROM `wod` ORDER BY `id` DESC LIMIT 4) AS `ids_to_keep`)");
$row mysql_fetch_assoc($sql)) {
$del mysql_query(sprintf("DELETE FROM `wod` WHERE `id` = %d", (int) $row['id'])); // delete current row
unlink($row['imagelocation']); // remove image from current row

$sql="INSERT INTO `wod` SET `month`='$_month', 
    if (!
'Error: ' mysql_error());