After successfully creating a registering system I can't use the login system I've created, it always gives the error message I've set "Wrong Email or Password" although the values are right!
The code for validating the login process:
<?php
$con = mysql_connect("***","*****","****");
mysql_select_db("*****", $con);
$emailin=$_POST['emailin'];
$passwordin=$_POST['password'];
$emailin = stripslashes($emailin);
$passwordin = stripslashes($passwordin);
$emailin = mysql_real_escape_string($emailin);
$passwordin = mysql_real_escape_string($passwordin);
$sql="SELECT * FROM users WHERE email='$emailin' and password='$passwordin'";
$result=mysql_query($sql);
$count=mysql_num_rows($result);
if($count==1){
session_register("emailin");
session_register("passwordin");
header("location:profile.php");
}
else {
echo "Wrong Email or Password";
}
?>
Thanks