login

Discussion in 'PHP' started by dean5000v, Mar 7, 2008.

  1. #1
    hey on my hosting site i have a link to the hosting login WHM but know i wont a login script that links to that i found this script, but im not sure what parts i need to edit. its a webmail and hosting login script.


    <table align="center" border="0" cellpadding="25" cellspacing="0">
    <tr><td align="left">
    <p align="left">
    <font size="+1" color="#0000a0">cPanel Login</font></p>
    <?php
    if ($_GET['cfailed'] == "1") {
    ?>
    <p align="left">
    <font color=#ff0000><b>Your login attempt failed!</b></font></p>
    <?php
    }
    print "<form action=\"https://" . $_SERVER['HTTP_HOST'] . ":2083/login/\" method=\"post\">";
    ?>
    <p align="left">
    <b>Username: </b><input type="text" name="user" size="10"><br>
    <b>Password: </b><input type="password" name="pass" size="12"><br>
    <?php
    print "<input type=\"hidden\" name=\"failurl\" value=\"http://" .  $_SERVER['HTTP_HOST'] .
     $_SERVER['PHP_SELF'] . "?cfailed=1\">";
    ?>
    <input type="submit" value=" Login ">
    </form></p>
    </td><td align="left">
    <p align="left">
    <font size="+1" color="#0000a0">Webmail Login</font></p>
    <?php
    if ($_GET['mfailed'] == "1") {
    ?>
    <p align="left">
    <font color=#ff0000><b>Your login attempt failed!</b></font></p>
    <?php
    }
    print "<form action=\"https://" . $_SERVER['HTTP_HOST'] . ":2096/login/\" method=\"post\">";
    ?>
    <p align="left">
    <b>Username: </b><input type="text" name="user" size="10"><br>
    <b>Password: </b><input type="password" name="pass" size="12"><br>
    <?php
    print "<input type=\"hidden\" name=\"failurl\" value=\"http://" .  $_SERVER['HTTP_HOST'] .
     $_SERVER['PHP_SELF'] . "?mfailed=1\">";
    ?>
    <input type="submit" value=" Login ">
    </form></p>
    </td></tr>
    </table>
    PHP:

     
    dean5000v, Mar 7, 2008 IP
  2. J.T.D.

    J.T.D. Peon

    Messages:
    86
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    There is no part you would need to edit, if you want to use it on your site. It uses $_SERVER['HTTP_HOST'] so it will use the domain that the scripts on.

    - JTD.
     
    J.T.D., Mar 7, 2008 IP