melvyn
Posts: 333
|
| Posted: 03/23/2009, 5:02 AM |
|
build a form asking the user to enter his/her email.
Change the datasource of the field from DatabaseColum to CustomCode
OnValidate event
$user_email = $Container->email->GetValue();
$db = new clsDBYourConnection();
$SQL = "SELECT password_field FROM users_database WHERE email=".$user_email;
$db->query($SQL);
$result = $db->next_record();
if($result){
$headers = "From: yourmail@yourdomain \r\n" .
"Reply-To: yourmail@yourdomain \r\n" .
"MIME-Version: 1.0 \r\n".
"Content-type: text/html; charset=iso-8859-1' \r\n".
"X-Mailer: PHP/ " . phpversion();
$password = $db->f(0);
$mail($user_email,"your password" ,"dear user: your password is: $password",$headers);
}
Those lines above are a mockup. Tweak the values and check.
_________________
Melvyn Perez
Puro Codigo
http://purocodigo.com |