Re: Re: Retrieving password from database

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If you have your password field encrypted (you should!) then you will 
not be able to retrieve it.

prasad wrote:
>
>
>
> --- In php-objects@xxxxxxxxxxxxxxx 
> <mailto:php-objects%40yahoogroups.com>, "doneatlast1000" 
> <doneatlast1000@...> wrote:
> >
> > I write the script below for users to retrieve their password when 
> forgotten, but the echo result is not brining out the password as it 
> output: Your password is
> >
> > Can anyone look at the script below and help out.
> >
> > <?php
> > if (!empty($_POST[Submit]))
> > {
> > include ("connect.php");
> > $pwquestion=$_POST[pwquestion];
> > $pwanswer=$_POST[pwanswer];
> > $cityob=$_POST[cityob];
> > $check=mysql_query("SELECT * FROM register WHERE 
> pwanswer='$pwanswer' AND cityob='$cityob'");
> > if(mysql_num_rows($check)==0)
> > echo "Invalid Check";
> > else
> > {
> >
> > $pass=$row[pass];
> > $sel=mysql_query("SELECT * FROM register WHERE pass='$pass'");
> > $row=mysql_fetch_array($sel);
> > echo "Your Password is <b>$pass</b>";
> > // The output is: Your Password is
> > // I need the really password($pass) to be echo out
> > }
> > }
> > in $pass=$row[pass];
> line try to change like this
> $pass=$row['pass'];
>
> 


-------------------------------------------------
John Collins
Meetings and Mixers
Box 80461
Rancho Santa Margarita, CA 92688
c949 689 7070
john@xxxxxxxxxxxxxxxxxxxxx
http://www.meetingsandmixers.com/



[Non-text portions of this message have been removed]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux