Unless I've missed it somewhere, $row[pass] doesn't really do anything. You're just setting $pass to another variable that does nothing. -- Joe On Jan 13, 2010, at 7:06 AM, 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 > } > } > ?> > > [Non-text portions of this message have been removed] ------------------------------------ Are you looking for a PHP job? Join the PHP Professionals directory Now! http://www.phpclasses.org/jobs/ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-objects/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/php-objects/join (Yahoo! ID required) <*> To change settings via email: php-objects-digest@xxxxxxxxxxxxxxx php-objects-fullfeatured@xxxxxxxxxxxxxxx <*> To unsubscribe from this group, send an email to: php-objects-unsubscribe@xxxxxxxxxxxxxxx <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/