Login encrypt password to compare
<p>Updated code still not working?</p>

<pre><code>&lt;?php

$host="localhost"; 
$username="root"; 
$password="power1"; 
$db_name="members"; 
$tbl_name="users"; 

string sha1 ( string $Password [, bool $raw_output = false ] )

$link  = mysql_connect("$host", "$username", "$password")or die("cannot connect. Please contact us");
mysql_select_db("$db_name")or die("cannot select DB. Please contact us");

$Email=$_POST['Email'];
$Password=$_POST['Password'];

$Email = stripslashes($Email);
$Password = stripslashes($Password);
$Email = mysql_real_escape_string($Email);
$Password = mysql_real_escape_string($Password);

$sql="SELECT * FROM $tbl_name WHERE Email='$Email' AND password ='$Password'";
$result=mysql_query($sql, $link) or die ('Unable to run query:'.mysql_error());

$count=mysql_num_rows($result);

if($count==1){
session_register("Email");
session_register("Password");
header("location:login_success.php");
}
else {
echo "Wrong Email or Password. Please Wait.&lt;meta http-equiv='REFRESH' content='1;url=login.php'&gt;";
}
?&gt;
</code></pre>
