PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
i want to make a program to retrieve the password for a given email....
i had made a table named 'table1'with column name userid, EMAIL and password but the code is not working can anybody tell me what am i doing wrong??
<?php
$localhost="host";
$username="admin";
$password="1234567891011";
$db="table1";
$email:xyz@yahoo.com;
$link=mysql_connect($localhost,$username,$password) or die("some prob1");
$database=mysql_select_db($db,$link)or die("some prob2");
$query = "select PASSWORD from member_login where EMAIL='$email'";
$result=mysql_query($query,$link) or die('some problem with your email');
$row = mysql_fetch_array($result);
echo $row['PASSWORD'];
?>
Last edited by Benjamin on Tue Apr 05, 2011 5:32 am, edited 1 time in total.
Reason:Added [syntax=php] tags.