WHY IS THIS PHP SCRIPT NOT WORKING?
//test.php
if (isset($_POST['submit'])) {
if ($_POST['username']) == 'myusername') && ($_POST['password']) == 'mypassword')) {
header ('location: search.php');
exit();
}
}
?>
i wish to redirect the user to my search engine if their login was successful.
thanks a bunch.
whilikers, that is a great point, thanks. I have made the capitalization, but unfortunately it still does not work. something somewhere is wrong:-)
ADD:
what does it mean “if your web page receives any html or even blank space, the header() function wont work”?
about 1 year ago
HTTP header names are case-sensitive. Try “Location:” instead of “location:”.