I don't know where I am wrong with this PHP code. When i click on log in in my log in Page the username and password gonna check in this code den it should redirect to 'dashboard.php' but the process gets end on this page. It shows blank. Please can anyone tell me where I am doing wrong?
<?php
include('db.php');
flush();
//error_reporting(1);
$username=$_POST['username'];
$password=sha1($_POST['password']);
$username = stripslashes($username);
$password = stripslashes($password);
$sql="SELECT * FROM user_qc WHERE qc_user_name='$username' and qc_pass='$password'";
$result=mysql_query($sql);
$count=mysql_num_rows($result);
if($count==1){
session_start();
$_SESSION['log'] = 'in';
$_SESSION['username']= $username;
header("Location:dashboard.php");
}
?>