My administrative "panel" will be much more secure; this is just so people can login to submit content. I have been running it on a test page, and it always takes the "Die" road or, if it's not there, shows an error.
Edit: I posted it on PHP Freaks, and this is what they gave me and which works beautifully.
$connid = mysql_connect ('localhost' , 'DBUSER' , 'DBPASS');
// make sure you escape any user input
$name = mysql_real_escape_string($_POST['name']);
$pass = mysql_real_escape_string($_POST['password']);
// select the username and password that match $name and $pass limit the query by 1
$sql = "SELECT `username`, `password` FROM users WHERE `username`='$name' AND `password`='$pass' LIMIT 1";
$result = mysql_query ($sql, $connid) or die("Unable to find username/password in database.");
// check that the query returned 1 result, if it did its a successful login!
if(mysql_num_rows($result) == 1)
setcookie ("lap", "$name", time() + 3600);
echo "Login Successful! Your username is $name. You will remain logged in for one hour. You may click the logout button to end your session early.";
else // not successful!
echo "Login failed.";