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:
<?php 
include 'core/init.php';
protect_page();
header("Location: wod_admin.php");

function 
GetFileName($f)
{
/* 
* this function will get the name of a file
* for Instance if the file is image14.jpg 
* only image14 will be returned.

BY wilson382
*/
    
$h=substr($f,strrpos($f,"/"),strrpos($f,"."));
    
$FileNamesubstr($h,1,strrpos($h,".")-1);
    
return 
$FileName;
}

if(isset(
$_POST['submit']))
{
    if(
is_uploaded_file($_FILES['myfile']['tmp_name']))
    {
        
$name $_FILES['myfile']['name'];
        
$tmp_name $_FILES['myfile']['tmp_name'];
        
$location "images/wod/$name";
        
move_uploaded_file($tmp_name,$location);
    }
    
    
$_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`)");
while(
$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', 
                                  `day`='
$_day', 
                                  `year`='
$_year', 
                                  `name`='
$_name', 
                                  `w1`='
$_w1',
                                  `w2`='
$_w2',
                                  `w3`='
$_w3',
                                  `w4`='
$_w4',
                                  `w5`='
$_w5',
                                  `w6`='
$_w6',
                                  `comment`='
$_comment',
                                `imagelocation`='
$location'";
        
    if (!
mysql_query($sql))
    {
        die(
'Error: ' mysql_error());
    }     
    
mysql_close($con);
}

?>