Jump to content


Photo

recovery of lost password


  • Please log in to reply
4 replies to this topic

#1 destined

destined
  • Members
  • PipPip
  • Member
  • 15 posts
  • LocationFlorida

Posted 15 May 2006 - 09:28 PM

This was working and all i did was take Zip & Address out of the table
i think that is when this stoped working (not sure)
I dont know much PHP I let Deramweaver do that for me.. lol
it 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'); ?>
<?php
mysql_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'); ?>
<?php
mysql_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 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>";}


}


?>
[!--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]

#2 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 15 May 2006 - 11:26 PM

[!--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.

#3 .josh

.josh
  • Staff Alumni
  • .josh
  • 14,871 posts

Posted 15 May 2006 - 11:40 PM

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) View Post[/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...
Did I help you? Feeling generous? Buy me lunch! 
Please, take the time and do some research and find out how much it would have cost you to get your help from a decent paid-for source. A "roll-of-the-dice" freelancer will charge you $5-$15/hr. A decent entry level freelancer will charge you around $15-30/hr. A professional will charge you anywhere from $50-$100/hr. An agency will charge anywhere from $100-$250/hr. Think about all this when soliciting for help here. Think about how much money you are making from the work you are asking for help on. No, we do not expect you to pay for the help given here, but donating a few bucks is a fraction of the cost of what you would have paid, shows your appreciation, helps motivate people to keep offering help without the pricetag, and helps make this a higher quality free-help community :)

#4 destined

destined
  • Members
  • PipPip
  • Member
  • 15 posts
  • LocationFlorida

Posted 16 May 2006 - 12:19 AM

ok so i might not know PHP
but the way to learn is to come here and ask
i dont let Dreamweaver do it all

Thank you Crayon Violent for trying to help
i will try what you said and no this is not a Dreamweaver code
ill be back tomorrow Thanks agian Crayon Violent
[!--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]

#5 destined

destined
  • Members
  • PipPip
  • Member
  • 15 posts
  • LocationFlorida

Posted 20 May 2006 - 08:54 AM

that worked

$emailaddress = $_POST['emailaddress']; $query="SELECT emailaddress,username,pwd FROM tbl_users WHERE tbl_users.emailaddress = '$emailaddress'";

Thanks agian Crayon Violent
[!--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