I've a html upload form. It's working in my Localhost. But It's not working on live sever. It's insert the information to db but not uploading the file to folder called "photos".
Php code:
$upload_path = "photos/";
$upload = mysql_query("INSERT INTO photos (photo_cap, photo_name, photo, date)
VALUES('$title','$filenameuniq', '$file', '$uploadate')");
if($upload)
{
if(!empty($file))
{
if(!move_uploaded_file($_FILES['file']['tmp_name'], $upload_path . $filenameuniq))
{
echo '<pre>Your file was not uploaded please try again here are your debug informations:'.print_r($_FILES) .'</pre>';
}
}//// upload to folder
echo "<font color=green>Successfully Updated.</font>";
header("Refresh:2; url=allphotos.php");
exit();
}
Debug:
Array ( [file] => Array ( [name] => Blue hills.jpg [type] => image/jpeg [tmp_name] =>
C:\Windows\Temp\php95FB.tmp [error] => 0 [size] => 28521 ) )
Your file was not uploaded please try again here are your debug informations:1
Why it's not uploading to "photos" folder ? On server how it's show C:\Windows ?