I'm creating an upload form for users to upload files to my server. but I
don't want them to overwrite existing files if they try to upload using the
same file name...
THE FOLLOWING SCRIPT WORKS PERFECTLY....
if (file_exists("uploads/documents/".$file_name)==TRUE) {
die ("File already exists");
}
else {
copy($file,"uploads/documents/".$file_name); }
BUT I WOULD RATHER HAVE IT REDIRECT THEM TO ANOTHER PAGE USING....
if (file_exists("uploads/documents/".$file_name)==TRUE) {
header("Location:http://www.mysite.com/file_exists.php");
}
else {
copy($file,"uploads/documents/".$file_name); }
THIS SCRIPT DOESN'T WORK...DOES ANYONE KNOW WHY???
Thanks
Shane
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php