Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(!isset($_POST['submit']))
- $user = $_POST['username'];
- $pass = $_POST['password'];
- $email = $_POST['email'];
- $email_from = 'Me@email.com';
- $email_subject = "Username and Password for you";
- $email_body = "Username: $user n".
- "Password: $pass n".
- $to = $email;
- $headers = "From: $email_from rn";
- $headers .= "Reply-To: $visitor_from rn";
- mail($to,$email_subject,$email_body,$headers);
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <title>Login Form in PHP with Session</title>
- <link href="style.css" rel="stylesheet" type="text/css">
- </head>
- <body>
- <form action="db.php" method="post">
- First name:<br>
- <input type="text" name="username" readonly value='<?php echo $random_first .'_'. $random_second; ?>'><br>
- Last name:<br>
- <input type="text" name="password" readonly value='<?php echo $pw; ?>'><BR>
- Enter your email to get a copy of these!<br>
- <input type="text" name="email"><BR>
- <input type ="submit" value = "submit" name="submit">
- </form>
- </body>
- Username:
- Password: hG31cZbTL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement