I am new to PHP and am learning as I go but i really appreciate some help.
I am trying to have two users, "important" and "special" login on a single page (control_panel.phtml - see below). Based on their login which is variefied on main.phtml, they are either kept on main.phtml or sent to another page, important.phtml. The user "important" works fine and gets directed to important.phtml. However, the user special, keeps going back to the control_panel.phtml page. Any and all assistance would be wonderful. I have a form page with the following code:
//--- control_panel.phtml --------->
<HEAD>
<TITLE>Admin tools for Lipper Web Hosting</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<FORM ACTION="main.phtml", METHOD="POST">
<INPUT TYPE="TEXT" NAME="who"><BR>
<INPUT TYPE="PASSWORD" NAME="passwd"><BR>
<INPUT TYPE="SUBMIT" NAME="go" VALUE="go">
</FORM>
</BODY>
Here is the code for main.phtml
<?PHP
//------- File Name: main.phtml ------>
if ($who=="important" && $passwd=="very") {
Header("Location:/important.phtml");
exit();
}
if ($who=="special" && $passwd=="money") {
Header("Location:/special.phtml");
exit();
}
if ( ($who!="important" || $passwd!="very") || ($who!="special" || $passwd!=money
s") ) {
Header("Location:/control_panel.phtml");
exit();
}
<BODY>
LOTS OF STUFF THAT THE SPECIAL WOULD BE ABLE TO SEE
</BODY>
~~~~~~~~~~~~~~~~~~~~~~~
As I said, above, my problem is that user and password work for important but I can't get the user and password to work for special. It just keeps going back to control_panel.phtml
Thanks in advance,
Heather