Hi,
I am trying to do something new on my webpage that i have not seen done before, i am trying to use a dropdown box to pick one of three different pages on my site to login to. there are 2 different “Name” 's to configure to go with the username and password data.
<form name=form2 method=POST action=login.php>
<input name=UR type=text size=10 />
<input name=PS type=password size=10 />
<select name=LI>
<option value="">Choose a Destination...
<option value=FR>Forums
<option value=FL >File Navigator
<option value=WM >Webmail
</select>
<input type=submit value=Login />
<input type=reset value=Reset>
</form>
that is the code for the form. each of the options is a different destination. UR is for the username, and PS for the password.
[php] <?php
/* username and password "Name" */
$UR = $_post[‘UR’];
$PS = $_post[‘PS’];
/* Dropdown box name*/
$LI = $_post[‘LI’];
/* dropdown box options */
$FR = $_post[‘FR’];
$FL = $_post[‘FL’];
$WM = $_post[‘WM’];
if ($LI = $FR) {
$_SERVER[/forums];
$UR = ['username'];
$PS = ['password'];
} elseif ($LI = $FL) {
$_SERVER[/admin];
$UR = ['login_usuario'];
$PS = ['login_contrasinal'];
}
} elseif ($LI = $WM) {
$_SERVER[/email];
$UR = ['login_usuario'];
$PS = ['login_contrasinal'];
}
?>[/php]
this is the code for the login page. i know its not right, and i’m not asking anyone to do this for me, all i want to know is:
-
is what i’m trying to do possible?
-
am i on the right track?
-
do you understand what i am trying to do?
P.S if you want a better idea of what i am trying to do the form is on my page @ http://www.lordsnow.com at the bottom.