Hi, I need a free script or method to put a "Contact Us" form on my website. Basically, user with queries will input his/her name, email address, and message. It will then be sent to my email address. Any idea where and how to implement it on my website? Your advice is appreciated.
Contact Form: ======================================= <form action="send.php" method="post"> E-mail Address: <input type="text" name="emailaddr" size="30" /><br> Your Name: <input type="text" name="your_name" size="30" /><br> Your Message: <textarea name="message" cols="50" rows="5"></textarea><br> <input name="submit" type="submit" value="Send" /> </form> Email Send Out Script "send.php": ====================================== <? $emailaddr = $_POST['emailaddr']; $name = $_POST['your_name']; $txt_message = $_POST['message']; $to = "your email address"; $send_html = "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"></head><body bgcolor=\"#C5E6EE\"><center><table width=\"40%\" bgcolor=\"white\" style=\"border: 3px #40ACC7 solid\"><tr><td width=\"100%\" height=\"80\" align=\"center\" style=\"font-size:12px; font-family: Arial;\">%%message%%</td></tr></table></center></body></html>"; if ($name == "" || $emailaddr == "" || $txt_message =="") { $message = "You must complete the form. Please go back and do so."; } else { $subject = "Subject"; //email subjuct $msg = "$name ($emailaddr),\r\n\r\$txt_message"; //email body content $emailheaders="From: $emailaddr\nReply-to: $emailaddr"; $msg = wordwrap($msg, 70); $suc = mail($to, $subject , $msg, $emailheaders); if ($suc) { $message = "Sent the link to ".$to; } else { $message = "<br />Error: The email could not be sent. "; } } $send_html = str_replace("%%message%%", $message, $send_html); echo $send_html; exit; ?>
Check out: http://shawswebsitedesign.com/contact.php I can give you this script if it is what you are looking for.
Search google for php+formmail or perl+formmail to obtain the working and sample form in the programming language of your choice. whats the error that you are encountering.
There are soo many, here get this one... It is easy to modify, this is what i had done for me.... http://www.webmaster-forums.net/projects/basic-php-email-feedback-form-0 Best Luck, ~ Mike
I have an .asp contact us form. I think it is pretty cool. You can use it if you are using asp. http://www.qualclosets.com/requestmenu.h... This then sends the info to the asp file which then will email you or whomever you want. you can try the <form mail...> bit or whatever that is, but I have read that it is not very reliable. I have never tried it myself but... If you are using asp, feel free.