Jump to content


lostpass word

  • Please log in to reply
No replies to this topic

#1 destined

  • Members
  • PipPip
  • Member
  • 15 posts
  • LocationFlorida

Posted 27 April 2006 - 07:49 PM


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>";}
[!--sizeo:1--][span style="font-size:8pt;line-height:100%"][!--/sizeo--][!--fonto:Comic Sans Ms--][span style="font-family:Comic Sans Ms"][!--/fonto--]May God bless you today and always[!--fontc--][/span][!--/fontc--][!--sizec--][/span][!--/sizec--]
[a href="http://www.destinedtowin.org/" target="_blank"]you are Destined To Win[/a]

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users