if($_REQUEST[submit]){ $target_path = "upload/"; $target_path = $target_path . basename( $_FILES['uploadedfile']['name']); $file_name = basename( $_FILES['uploadedfile']['name']); if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) { $result=MYSQL_QUERY("INSERT INTO files (File_Id, File_Name) ". "VALUES ('','$file_name')"); echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded"; } else{ echo "There was an error uploading the file, please try again!"; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)