Choose a File to Upload:
} else { $bad = array("/ /","/!/","/@/"); /* unwanted syntax */ $good = array("_","_","_"); /* replacement syntaxt */ $File1_name = Strtolower($File1_name); /* set the name to lowercase */ $File1_name = preg_replace($bad, $good, $File1_name); /* validate and\or modify the syntax */ if (!file_exists($MyDest)) { echo "sorry, the directory destination does not exist"; } else { $MyPath = "$MyDest"."$File1_name"; /* add the filename to the destination */ copy($File1,$MyPath) or die("Error Uploading File"); echo "
File Uploaded Successfully!!
"; echo "File Name: $File1_name
"; echo "File Type: $File1_type
"; echo "File Size: $File1_size
"; echo "File Saved to: $MyDest
"; echo "
"; } ?>