I have just started learning PHP and I cant seem to to work like this is not going to welcome.php please help? Thankyou for your help as I have litterally put my head into this :(
$user=$_POST['user'];
$pass=$_POST['pass'];
$que ="SELECT * FROM users WHERE username='$user' and password='$pass'";
$res=mysql_query($que);
    $c=mysql_num_rows($res);
    if($c==1){
    $_SESSION['user'] = $user; 
    header("location: welcome.php");
    }
    else {
    header("location: empty.php");
    }
    ?>
        <form name="myform" method="POST" action="login.php">
         <input name="username" type="text" id="username">
         <input name="pass" input type="password" id="pass">
         <input type="submit" name="Submit" value="Login">
        </form>
 
    