0 | | $fileError == 0){ //check if the file is corrupt or error $move=move_upload_file($_FILES['picture']['tmp_name'],'E:/ DocunentRootYuni/helloMobile/image/',$fileName);//save image to the folder if($move){echo "
Succes..!
";
$q="INSERT into tb_image VALUES(",' $fileName')";//insert image property to database $result=mysql_query($q);
$q1 = "SELECT location from tb_image where filename = '$fileName'limit1";//get the image that have been uploaded $result = mysql_query(q1);
while ($data = mysql_fetch_array('$result)) {$loc = $data['location'];?>
This is the image :

failed..!
}
} else{
echo "Failed to upload : " ,
$fileError;
}
?>