Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New to the CF scene
    Join Date
    Mar 2008
    Thanked 0 Times in 0 Posts

    cPanel login failurl


    I am trying to create a webmail login page other than using the cpanel domain.com/webmail. I have the following code below (domain.com/maillogin.php) that works if you enter a correct user/pass. If an incorrect user/pass is entered I get automatically take to domain.com:2095/webmail. Is there a way to be redirected back to domain.com/maillogin.php if an incorrect user/pass is entered


    $protocol = 'http';
    $port = 2095;


    <b>cPanel Login</b><br>
    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>
    echo "<input type=hidden name=failurl value=\"http://" ;
    echo $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
    echo "?failed=1\">";
    <input type=submit value=Login>

    Last edited by boy143878; 03-31-2008 at 10:22 PM.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts