Advertisement
Guest User

DEMO

a guest
Jul 9th, 2015
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>Untitled Document</title>
  6. </head>
  7.  
  8. <body>
  9. <?php
  10. if(isset($_REQUEST['submit']))
  11. {
  12. $to1 = $_REQUEST['to'];
  13. $from = $_REQUEST['from'];
  14. $sub = $_REQUEST['sub'];
  15. $msg = $_REQUEST['msg'];
  16. //$to = "abc@gmail.com";
  17. //$sub = "Demo-PHP";
  18. //$msg = "Hello...........";
  19. //$from ="xyz@yahoo.com";
  20. mail($to1,$sub,$msg,$from);
  21. echo "<script type=application/javascript>alert('Message is send !!!');</script>";
  22. }
  23. ?>
  24. <form method="post">
  25. <table>
  26. <tr>
  27. <td>To</td>
  28. <td><input type="email" name="to" /></td>
  29. </tr>
  30. <tr>
  31. <td>Subject</td>
  32. <td><input type="text" name="sub"/></td>
  33. </tr>
  34. <tr>
  35. <td>From</td>
  36. <td><input type="text" name="from" /></td>
  37. </tr>
  38. <tr>
  39. <td>msg</td>
  40. <td><input type="text" name="msg" /></td>
  41. </tr>
  42. <tr>
  43. <td>
  44. <input type="submit" name="submit" value="Send" />
  45. </td>
  46. </tr>
  47. </table>
  48. </form>
  49. </body>
  50. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement