Advertisement
Guest User

Untitled

a guest
Feb 25th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. <?php
  2. if(!isset($_POST['submit']))
  3.  
  4. $user = $_POST['username'];
  5. $pass = $_POST['password'];
  6. $email = $_POST['email'];
  7.  
  8. $email_from = 'Me@email.com';
  9. $email_subject = "Username and Password for you";
  10. $email_body = "Username: $user n".
  11. "Password: $pass n".
  12.  
  13. $to = $email;
  14. $headers = "From: $email_from rn";
  15. $headers .= "Reply-To: $visitor_from rn";
  16.  
  17. mail($to,$email_subject,$email_body,$headers);
  18.  
  19. ?>
  20.  
  21. <!DOCTYPE html>
  22. <html>
  23. <head>
  24. <title>Login Form in PHP with Session</title>
  25. <link href="style.css" rel="stylesheet" type="text/css">
  26. </head>
  27. <body>
  28. <form action="db.php" method="post">
  29. First name:<br>
  30. <input type="text" name="username" readonly value='<?php echo $random_first .'_'. $random_second; ?>'><br>
  31. Last name:<br>
  32. <input type="text" name="password" readonly value='<?php echo $pw; ?>'><BR>
  33. Enter your email to get a copy of these!<br>
  34. <input type="text" name="email"><BR>
  35. <input type ="submit" value = "submit" name="submit">
  36. </form>
  37. </body>
  38.  
  39. Username:
  40. Password: hG31cZbTL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement