I'm a newbie, and trying to learn the basics of MySql and PHP by creating a simple login page. The code below doesn't error out, but doesn't redirect either. Just returns to this page. Any suggestions/information on -why- this is happening would be helpful for the learning process. Thanks in advance.
if (!empty($_POST['login'])
{
mysql_connect('DB_PATH', 'DB_USER', 'DB_PASSW') or die(mysql_error());
mysql_select_db('DB_NAME') or die(mysql_error());
mysql_query('SELECT * FROM Login WHERE Username = '$_POST['username']' and Password = '$_POST['password']')or die(mysql_error());
header("Location: hello.php");
}
Thanks, I can see how the Select quotes were amiss. I've change the code per Zoxive to report errors and correct the syntax, but it still just returns to the page, no error, no redirect.