 <script language="JavaScript" type="text/javascript">
<!-- Begin
function verifyy() {

document.formm.submit();

}
//  End -->
</script>

<?php
$SQL = "SELECT * from USERS WHERE EMAIL = '$_POST[EMAIL]'"; $result = @mysql_query( $SQL ); $row = @mysql_fetch_array( $result );
if (empty($row[EMAIL])) $sendcheck = fail; else $sendcheck = pass;
?>
<?php
//-----------------------sendcheck
if ($sendcheck == fail) {
//-----------------------
?>
<span class="font1"><b>O.K, nobody panic...</b></span> <br>
<br>
The email address: <b> 
<?php echo $_POST[EMAIL]; ?>
</b> was not found in our records. Did you enter your email address correctly?<br>
<br>
<form action="index.php?page=resend_password" method="post" name="formm" id="form1">
<table width="100%" cellpadding="0" cellspacing="0" border="0" >
<tr> 
<td class="td4" nowrap>Email Address</td>
<td class="td4" width="100%" colspan="2"> 
<input type="text" name="EMAIL" size="40" class="textarea100"/>
</td>
</tr>
</table>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> 
<td width="100%"> </td>
<td> 
<table width="1%" border="0" cellspacing="0" cellpadding="0">
<tr> 
<td><img src="images/buttonleft.png" width="20" height="57"></td>
<td background="images/buttoncenter.png" width="100%" nowrap> 
<div class="idevlink2" align="center"><a href="#" onClick="verifyy();"><b>Send my Password</b></a></div>
</td>
<td><img src="images/buttonright.png" width="16" height="57"></td>
</tr>
</table>
</td>
</tr>
</table>
</form>
<?php
//-----------------------
}
//-----------------------
?>
<?php
//-----------------------sendcheck
if ($sendcheck == pass) {
sendmail("$row[EMAIL]","dailyhandout@gmail.com","dailyhandout.com lost password recovery","Someone (probably you) requested a lost password recovery for the email address: <b>$row[EMAIL]</b><br><br>Your password is: <b>$row[PASSWORD]</b><br><br>- Thanks<br><i>Arron & Mike<br>www.dailyhandout.com</i>");
//-----------------------
?>
<span class="font1"><b>Good news...</b></span> <br>
<br>
Your login information has been emailed to: <b> 
<?php echo $_POST[EMAIL]; ?>
.</b> Check your inbox to retrieve your login credentials. If you don't see an email from us, check your spam folder.<br>
<br>
<a href="index.php?page=login"><b>Log In</b></a> 
<?php
//-----------------------
}
//-----------------------
?>
