(THANK YOU ALL FOR SUPPORTING ME, I APPRECIATE ALL YOUR COMMENT ),
CHECK IF THERE IS ANY SECURITY HOLE IN THIS SCRIPT ,<?php
$conn = mysql_connect("localhost","root","root");
mysql_select_db("user");
$email=strip_tags($email);
if (!preg_match("/^([a-zA-Z0-9])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)+/", $email=$_POST['email']))
{
die("<font size=5>Please Enter A valid e-mail address</font>");
}
$query="SELECT email,username,password FROM user WHERE email = '$email'";
$st=mysql_query($query);
$recs=mysql_num_rows($st);
$row=mysql_fetch_object($st);
$em=$row->email;// email is stored to a variable
if ($recs == 0) { // No records returned, so no email address in our table
// let us show the error message
echo "<center><font face='Verdana' size='2' color=red><b>No Password</b><br> Sorry Your address is not there in our database . You can signup and login to use our site. <BR>
<BR><a href='SIGHNUP.HTML'> Sign UP </a> </center>";
exit;}
// formating the mail posting
// headers here
$headers4="
admin@someone.net"; // Change this address within quotes to your address
$headers.="Reply-to: $headers4\n";
$headers .= "From: $headers4\n";
$headers .= "Errors-to: $headers4\n";
//$headers = "Content-Type: text/html; charset=iso-8859-1\n".$headers;
// for html mail un-comment the above line
// mail funciton will return true if it is successful
if(mail("$em","Your Request for login details","This is in response to your request for login detailst at Holly Faith \n \nLogin ID: $row->username \n Password: $row->password \n\n Thank You \n \n siteadmin","$headers")){echo "<center><font face='Verdana' size='2' ><b>THANK YOU</b> <br>Your password is posted to your emil address . Please check your mail after some time. </center>";}
?>