$uploadDir = 'images/'; //Image Upload Folder if (isset($_POST['submit'])){ $fileName = $_FILES['Photo']['name']; $tmpName = $_FILES['Photo']['tmp_name']; $fileSize = $_FILES['Photo']['size']; $fileType = $_FILES['Photo']['type']; $filePath = $uploadDir . $fileName; $result = move_uploaded_file($tmpName, $filePath); if (!$result) { echo' An error occurred'; exit(); } if(!get_magic_quotes_gpc()) { //addslashes adds a backslash before any malicious characters, for security $fileName = addslashes($fileName); $filePath = addslashes($filePath); };
echo 'An error occured';
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)