Quote:
Originally Posted by Patty
Very nice! I was looking for something like that, thank you.
What I actually want is a multiple server login form. I have 4 different servers, so I'd need to have a way for the client to select the server and then login. Is it possible. Does anyone know how to do it?
|
Sorry for the delay. It is indeed possible! Here is a small example on how to do this:
Add the following to the form:
Code:
<select name="host">
<option value="00.0.000.000">Server 1</option>
<option value="00.0.000.000">Server 2</option>
<option value="00.0.000.000">Server 3</option>
<option value="00.0.000.000">Server 4</option>
</select>
As for the cpanel.php, add the variable $_POST["user"]. Here is the code bit you can replace:
PHP Code:
else if ($_POST["secure"] == 1){
header("Location: https://".$_POST["user"].":".$_POST["pass"]."@$_POST["host"]:2083");}
else {
header("Location: http://".$_POST["user"].":".$_POST["pass"]."@".$_POST["host"].":2082");}
}
Hope that helps

Just remember to replace the 00.0.000.000 with the correct ips or domain names (without the www. or the
http://)