Hi, everyone. I'm trying to make a very simple login. The username and password the user will put in will be run through my database, and once they match, the page should then go to Link.php...however, it's not working. All it does is re-run the page with the form. What is wrong with this code?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>
<?php

mysql_connect("localhost" , "" , "") or die(mysql_error());
mysql_select_db("table") or die(mysql_error());

if (isset($_POST['Submit'])){
if (isset($_POST['Username']) && ($_POST['Password'])){
$UserVAR = $_POST['Username'];
$UserPASS = $_POST['Password'];

$sql = "SELECT * FROM registerii WHERE Username='$UserVAR' AND Password='$UserPASS' ";
$query = mysql_query($sql) or die(mysql_error());
$fetch = mysql_fetch_array($query);
}

if(($UserVAR == $fetch['Username']) && ($UserPASS == $fetch['Password'])){
header('locaton: Link.php');
}

}

?>
<title>Testing Sessions</title>

</head>

<body>

<form action="<?php $_SERVER['PHP_SELF'] ?>" method="POST" style="text-align: center;">
Username: <input type="text" name="Username" /><br />
Password: <input type="password" name="Password" /><br />
<input type="submit" name="Submit" value="Enter" />
</form>

</body>

</html>
Nevermind the blank user and password for the localhost!

Thanks!