<?php if(isset($_POST['btnsend'])){ $mail_to = $_POST['email']; $mail_from = "From:info@novpiseth.co.cc"; $mail_subject = $_POST['sub']; $mail_message = $_POST['txtmessage']; mail($mail_to,$mail_subject,$mail_message,$mail_from); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <form action="#" method="post"> Email:<input type="text" name="email" /><br /> Subject:<input type="text" name="sub" /><br /> Message:<textarea cols="10" rows="3" name="txtmessage"></textarea><br /> <input type="submit" name="btnsend" value="Send" /> </form> <body> </body> </html>
PHP Send Mail
December 2nd, 2010 by Nov Piseth Leave a reply »
Advertisement