Thanks for the quick reply, Laserlight.
Okay I tried that, got the following error...
Notice: Undefined index: file_up in C:\Inetpub\wwwroot\upload\uploadit.php on line 9 Notice: Undefined index: file_up in C:\Inetpub\wwwroot\upload\uploadit.php on line 10 Notice: Undefined index: file_up in C:\Inetpub\wwwroot\upload\uploadit.php on line 11 Notice: Undefined index: file_up in C:\Inetpub\wwwroot\upload\uploadit.php on line 14 Notice:
$file_upload="true";
$file_up_size=$_FILES['file_up']['size'];
echo $_FILES['file_up']['name'];
if ($_FILES['file_up']['size']>1250000){$msg="Your uploaded file size is more than 250KB so please reduce the file size and then upload. Visit the help page to know how to reduce the file size.<BR>";
$file_upload="false";}
if (!($_FILES['file_up']['type'] =="text/.csv" )){$msg="Your uploaded file must be a JPG or GIF. Other file types are not allowed<BR>";
$file_upload="false";}
$file_name=$_FILES['file_up']['name'];
$add="upload/$file_name"; // the path with the file name where the file will be stored, upload is the directory name.
if($file_upload=="true"){
if(move_uploaded_file ($_FILES['file_up']['tmp_name'], $add))
{
// do your coding here to give a thanks message or any other thing.
}else{echo "Failed to upload file Contact Site admin to fix the problem";}
}
?>
Do you see anything else wrong...