I jus have started getting error Array ( [type] => 2 [message] => copy(): Filename cannot be empty [file] => /home/fraptech/public_html/notredamedelhi.com/modifyhome.php [line] => 73 ) i.e. the HTTP_POST_FILES line Before a month the files wer getting uploaded successfully. This problem has started only now. And i haven't modified the code since then.
<?php
if ($_POST['Upload'])
{
$file_name = $HTTP_POST_FILES['ufile']['name'];
$new_file_name="slider_photo1.jpg";
$path= "images/".$new_file_name;
if($ufile !=none)
{
if(copy($HTTP_POST_FILES['ufile']['tmp_name'], $path))
{
echo "Successful<BR/>";
}
else
{
echo "Error ";
print_r(error_get_last());
}
Please help with the code.