The script should upload files (images).

Error message is give below, any ideas why I get this errror message?
Parse error: parse error in /var/www/html/uploadproc.php on line 3


//Upload.php (form) <form method="post" action="uploadproc.php" enctype="multipart/form-data"> <input type="file" name="myfile"><br /> <input type="hidden" name="MAX_FILE_SIZE" value="1024"> <input type="submit" value="Upload File"> </form>

//uploadproc.php
if(!isset($_FILES['myfile'])) {
die "Error! The expected file wasn't a part of the submitted form";
}

if($_FILES['myfile']['error'] != UPLOAD_ERR_OK) {
die "Error The file uploaded failed.";
}

if(!move_uploaded_file($_FILES['myfile']['tmp_name
'],
"/var/www/html/upload/")) {
die "Error! Moving the uploaded file failed.";

}

echo "File successfully uploaded.";
?>

_________________________________________________________________
Learn how to help protect your privacy and prevent fraud online at Tech Hacks & Scams. http://special.msn.com/msnbc/techsafety.armx


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to