0

Hello Everyone,

I hava design just a register page and a login page ,a user can register then login..during registration i used the password() for password field insert value to database. During login I used as password('_POST[pass]') and comparing with the inserted value but its not working ....
I just tried this ...

<?PHP
if(isset($_POST))
{
$my_con=mysql_connect("localhost","root","xyz");
$my_db= mysql_select_db("xy",$my_con);
$sql= "SELECT * FROM member WHERE loginName ='".$_POST[user]."' AND password = password('".$_POST."')";
$my_user= mysql_query($sql);
if($db_field = mysql_fetch_assoc($my_user))
{
print $db_field."<br>";
print $db_field;
print $db_field;
}
else
print "Username or Password is incorrect";
}
?>

so please help me...

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by aksahoo17
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.