You could do this by just running an if statement. An if statement has two parts
if(this is true)
{
do_this();
{
else
{
do_something_different();
}
So a more basic example is the following.
$num = 8;
if($num < 5)
{
echo "Number is less than five";
}
else
{
echo "Number is greater than five";
}
When the if statement runs, it will run through the first part and return FALSE because $num is not less than five. Or 8 is not less than five. So because this is not true, it will automatically move to the else part of the statement, and will tell you that the number is greater than five.
So in your case, you could setup a form where each of your 3 option values is set to the name of the php script. For example (the male female or child is all I could think of. Put what you want there, the diff type of logins, etc):
<select name="login_type">
<option value="1.php">Male</option>
<option value="2.php">Female</option>
<option value="3.php">Child</option>
</select>
When your script posts, you'll have three values that would possibly be given to you. 1.php, 2.php, or 3.php. This value would be stored in $_POST["login_type"] because login_type is the name of your field, and your form is set to post (I'm assuming)
so you can just include those;
<?php
include("lib/".$_POST["login_type"]);
?>
ehh...i ran a bit ahead of myself in this post. The reason I explained the if statements early was because you could also do something like this:
<?php
if($_POST["login_type"] == "1.php")
{
include("lib/1.php");
}
else
{
if($_POST["login_type"] == "2.php")
{
include("lib/2.php");
}
else
{
include("lib/3.php");
}
}
?>
In your form, the value for login_type can be set to anything. Let's say they were to set to a, b or c, you could do
<?php
if($_POST["login_type"] == "a")
{
include("lib/1.php");
}
else
{
if($_POST["login_type"] == "b")
{
include("lib/2.php");
}
else
{
// c is true
include("lib/3.php");
}
}
?>
Hope this helps.