need this form (http://www.ezstudentrentals.com/index-5.html) to go to an email address. You can use a sample script online to make it work, I just do not have the time for this. Email offers and time period when you will be able to do it.
you mean when somebody submits this form an email should be sent on a specified email id with details filled in? Is that the only thing or you also want a copy of details in database?
Here enjoy <?php // Settings // WHere the user came from $previous_file = ""; // Where do you want the email sent? $to = "ezstudentrentals@gmail.com"; // What should the email subject say? $subject =""; // Function thanks to http://www.phpro.org/tutorials/PHP-Security.html function safeEmail($string) { return preg_replace( '((?:\n|\r|\t|%0A|%0D|%08|%09)+)i' , '', $string ); } // message // email // telephone // last_name // first_name if(!empty($_POST['first_name']) && !empty($_POST['last_name']) && !empty($_POST['telephone']) && !empty($_POST['email']) && !empty($_POST['message'])) { // Fetch and sanitize input $first_name = safeEmail($_POST['first_name']); $last_name = safeEmail($_POST['last_name']); $email = safeEmail($_POST['email']); $telephone = safeEmail($_POST['telephone']); $header = "From: < ".$email." >\n To: ".$to."\n Subject: ".$subject."\n Date: ".date("Y-m-d h:i")."\n Reply-to: ".$email."\r\n "; $message = "From your form\n\nUserdetails\nFirst Name: ".$first_name."\nLast Name: ".$last_name."\nTelephone: ".$telephone."\nEmail: ".$email."\n" . safeEmail($_POST['message']); if(mail($to,"Contactform ",$message, $header)) { header("refresh: 3;url=".$previous_file); print("Email sent"); } else { header("refresh: 3;url=".$previous_file); print("An error occured: Could not send the email"); } } else { header("refresh: 3; url=".$previous_file.""); print("You did not fill out the whole form"); } ?> PHP: