Hello all,
I have tried posting this questions in many forums with no response yet. I hope I get lucky here. I pulled this script to create a custom webmail login page. The script works when using a valid user/password. However, if the user/password is incorrect I get sent to the cpanel default webmail login page. I would like to be redirected back to the custom webmail login page if the user/password are incorrect.
Thanks in advance.
Lance
<?php
#Webmail
$protocol = 'http';
$port = 2095;
?>
<html>
<b>cPanel Login</b><br>
<?php
if ($_GET['failed'] == "1") {
echo "Your login attempt failed!";
}
echo "<form action=\"" . $protocol . "://";
echo $_SERVER['HTTP_HOST'] . ":" . $port . "/login/\" ";
echo "method=POST>";
?>
User: <input type=text name=user><br>
Pass: <input type=password name=pass><br>
<?php
echo "<input type=hidden name=failurl value=\"http://" ;
echo $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
echo "?failed=1\">";
?>
<input type=submit value=Login>
</form>
</html>


