Jump to content


This topic is now archived and is closed to further replies.


lostpass word

Recommended Posts


Can dreamweaver make the code to send users there lost password or can someone help me with this code

this it not working i copied it from the web
i am new at PHP
i need to send user name and pswd to the user If anyone has the code for that please post

After sumitting i get this error

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in -- lost_passwordck.php on line 21

Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /usr/home/destined/public_html/lost_passwordck.php on line 22


if (isset($_POST['submit'])){ $query="SELECT emailaddress,username,pwd FROM tbl_users WHERE tbl_users.emailaddress = '$emailaddress'";
[!--coloro:#CC6600--][span style=\"color:#CC6600\"][!--/coloro--]$recs=mysql_num_rows($st);
$em=$row->emailaddress;// email is stored to a variable
if ($recs == 0) { 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='signup.php'> Sign UP </a> </center>"; exit;}

$headers4="admin@destinedtowin.org"; ///// 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 this line

if(mail("$em","Your Request for login details","This is in response to your request for login detailst at site_name \n \nLogin ID: $row->username \n Password: $row->pwd \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>";}
else{ echo " <center><font face='Verdana' size='2' color=red >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>";}


else {echo "<center><font face='Verdana' size='2' color=red >$msg <br><br><input type='button' value='Retry' onClick='history.go(-1)'></center></font>";}

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.