I am creating a simple elseif statement that matches username and password...the php is working except for one minor detail...all username/passwords go to the same destination with the 'elseif' statement. I am following a textbook example but is doesn't seem to work. Can you point me in the right direction? Your help is appreciated.
thanks,
impressionist
The code is below.
<?
if ($_POST['$username'] = 'user1' && $_POST['$password'] = 'pass1')
{
header("Location: http://www.somewhere.com/inventory_test2.html");
} elseif ($_POST['$username'] = 'user2' && $_POST['$password'] = 'pass2')
{
header("Location: http://www.somewhere.com/about_us.htm");
} else {
echo "<br><br>";
echo "<p align=center>";
echo "<b>Authentication Failed<br><br>Please hit your 'Back' button and try again.</b>" ;
echo "</p>" ;
}
?>