destined Posted May 15, 2006 Share Posted May 15, 2006 This was working and all i did was take Zip & Address out of the tablei think that is when this stoped working (not sure)I dont know much PHP I let Deramweaver do that for me.. lolit keeps saying the (echo)error that the email ady is not in DB but it is ! Please help[!--coloro:#000099--][span style=\"color:#000099\"][!--/coloro--]its the same if i use this[!--colorc--][/span][!--/colorc--]<?php $db_name = "destined_users"; //this is your database name $db_user = "destined_XXX"; //this is your database username for the database specified above $db_pass = "XXXX"; //this is your database password for the user specified above $db_host = "localhost"; //this is your host for the database, best to leave it as localhost mysql_connect("$db_host", "$db_user", "$db_pass")or die(mysql_error()); mysql_select_db("$db_name") or die(mysql_error()); ?>[!--coloro:#333399--][span style=\"color:#333399\"][!--/coloro--]Or If I Use This[!--colorc--][/span][!--/colorc--]<?php require_once('Connections/user_login.php'); ?><?phpmysql_select_db($database_user_login, $user_login);$query_rsRecover = "SELECT * FROM tbl_users";$rsRecover = mysql_query($query_rsRecover, $user_login) or die(mysql_error());$row_rsRecover = mysql_fetch_assoc($rsRecover);$totalRows_rsRecover = mysql_num_rows($rsRecover);?>[!--coloro:#333399--][span style=\"color:#333399\"][!--/coloro--]here is the Code[!--colorc--][/span][!--/colorc--]<?php require_once('Connections/user_login.php'); ?><?phpmysql_select_db($database_user_login, $user_login);$query_rsRecover = "SELECT * FROM tbl_users";$rsRecover = mysql_query($query_rsRecover, $user_login) or die(mysql_error());$row_rsRecover = mysql_fetch_assoc($rsRecover);$totalRows_rsRecover = mysql_num_rows($rsRecover);?><?$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 [!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--]emailaddress[!--colorc--][/span][!--/colorc--] = '$emailaddress'";$st=mysql_query($query);$recs=mysql_num_rows($st);$row=mysql_fetch_object($st);$em=$row->emailaddress;// email is stored to a variableif ($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 lineif(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>";}} ?> Quote Link to comment https://forums.phpfreaks.com/topic/9741-recovery-of-lost-password/ Share on other sites More sharing options...
trq Posted May 15, 2006 Share Posted May 15, 2006 [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]I let Deramweaver do that for me..[/quote]There is your problem and Im afraid this forum is for people who want help with php. Not help getting a program to wirte it for them. php is a complex programming language, ddo you really expect a program to be able to create applications by itself?Dreamweaver is the apotome of false hope for newbies. Quote Link to comment https://forums.phpfreaks.com/topic/9741-recovery-of-lost-password/#findComment-36109 Share on other sites More sharing options...
.josh Posted May 15, 2006 Share Posted May 15, 2006 well my first suggestion is that you are using $emailaddress instead of $_POST['emailaddress'] in your query. please note that these are NOT the same variables. replace $emailaddress with $_POST['emailaddress'] or else put this line:$emailaddress = $_POST['emailaddress'];right before the query. if this doesn't help then post the code that sets $emailaddress to the email address in question, as i don't seem to see where $emailaddress is being initialized in the code above...[!--quoteo(post=374151:date=May 15 2006, 06:26 PM:name=thorpe)--][div class=\'quotetop\']QUOTE(thorpe @ May 15 2006, 06:26 PM) [snapback]374151[/snapback][/div][div class=\'quotemain\'][!--quotec--]There is your problem and Im afraid this forum is for people who want help with php. Not help getting a program to wirte it for them. php is a complex programming language, ddo you really expect a program to be able to create applications by itself?Dreamweaver is the apotome of false hope for newbies.[/quote]funny.... but if you aren't going to help then why post at all? and besides, it is not that hard at all to make a script that builds/automates another script. That's what we call functions and objects. Now whether dreamweaver is buggy or not is another subject altogether... Quote Link to comment https://forums.phpfreaks.com/topic/9741-recovery-of-lost-password/#findComment-36111 Share on other sites More sharing options...
destined Posted May 16, 2006 Author Share Posted May 16, 2006 ok so i might not know PHP but the way to learn is to come here and aski dont let Dreamweaver do it allThank you Crayon Violent for trying to helpi will try what you said and no this is not a Dreamweaver codeill be back tomorrow Thanks agian Crayon Violent Quote Link to comment https://forums.phpfreaks.com/topic/9741-recovery-of-lost-password/#findComment-36114 Share on other sites More sharing options...
destined Posted May 20, 2006 Author Share Posted May 20, 2006 that worked$emailaddress = $_POST['emailaddress']; $query="SELECT emailaddress,username,pwd FROM tbl_users WHERE tbl_users.emailaddress = '$emailaddress'";Thanks agian Crayon Violent Quote Link to comment https://forums.phpfreaks.com/topic/9741-recovery-of-lost-password/#findComment-37396 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.