This was tested and working and now it is not
Now it sends the { echo " message to the user, even with a valid db email address.
Any help please
Newbeeee
<?php require_once('Connections/user_login.php'); ?>
<?php
mysql_select_db($database_user_login, $user_login);
$query_rsLost = "SELECT * FROM tbl_users";
$rsLost = mysql_query($query_rsLost, $user_login) or die(mysql_error());
$row_rsLost = mysql_fetch_assoc($rsLost);
$totalRows_rsLost = mysql_num_rows($rsLost);
?>
<?
$editFormAction = $SERVER['PHP_SELF'];
if (isset($SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
?>
if (isset($_POST['submit'])){ $query="SELECT emailaddress,username,pwd FROM tbl_users WHERE tbl_users.emailaddress = '$emailaddress'";
$st=mysql_query($query);
$recs=mysql_num_rows($st);
$row=mysql_fetch_object($st);
$em=$row->emailaddress;// email is stored to a variable
if ($recs == 0) { echo "<center><font face='Verdana' size='2' ><b>No Password</b><br> Sorry Your email address is not there in our database. You can register and login to use our members pages. <BR><BR><a href='registration.php'> Register </a> </center>"; exit;}
$headers4="password@destinedtowin.org"; ///// Change this address within quotes to your address ///
$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 this line
if(mail("$em","password/user name recovery","This is in response to your request for your login information for \n Destined To Win Ministries at www.destinedtowin.org \n\n username: $row->username \n password: $row->pwd \n\n Thank You \n \n \n Please do not reply to this email","$headers")){echo "<center><font face='Verdana' size='2' ><b>THANK YOU</b> <br>Your password and user name have been sent to your emil address. <br>
Please check your mail <BR><BR><a href='login.php'> Login </a><br>
<br>
</center>";}
else{ echo " <center><font face='Verdana' size='2' >There is some system problem in sending login details to your address. Please contact site-admin. <br><br><input type='button' value='Retry' onClick='history.go(-1)'></center></font>";}
}
?>