Is there any reason this is bad form? The only user input data on the page is
// Set username and password from cookies
$username = mysql_real_escape_string($_COOKIE["username"]);
$password = mysql_real_escape_string($_COOKIE['password']);
I am REALLY new to the idea of sanitizing. Is there any reason this is a terrible way of doing things?
NEVER, EVER store users' data in cookies!
Here's what I suggest: