[php]if(isset($_POST[‘login’]))
{
// Checking whether the Login form has been submitted[/color]
$err = array();
// Will hold our errors[/color]
if(!$_POST['username'] || !$_POST['password'])
$err[] = 'All the fields must be filled in!';
if(!count($err))
{
$_POST['username'] = mysql_real_escape_string($_POST['username']);
$_POST['password'] = mysql_real_escape_string($_POST['password']);
// Escaping all input data[/color]
$row = mysql_fetch_assoc(mysql_query("SELECT id,usr FROM tz_members WHERE usr='{$_POST['username']}' AND pass='".sha1($_POST['password'])."'"));
if($row['usr'])
{
header("Location:memberpage.php");
}
else $err[]='Wrong username and/or password!';
}
if($err){
$message=implode("<br/>",$err);
}
}
?>[/php]
this is my code for login. code have some thing wrong since showing nothing not any message.Also not redirecting the page. plz help me where i m going wrong in my Code. Thanks in Advance