//define a maxim size for the uploaded images in Kbdefine ("MAX_SIZE","1000");// Get name from form$firstname = $_POST['firstname'];
//If no errors registred, print the success messageif(isset($_POST['Submit']) && !$errors){ $to = "me@mydomain.com"; $subject = "File upload"; $body = "My file uploaded successfully... The link is: " .$newname; $body .= "\n"; // just creates a new line $body .= "Name: " .$firstname; // Send the email mail($to, $subject, $body, "From: <me@mydomain.com>"); // Show message echo "<h1>File Uploaded Successfully! Try again!</h1>";}