Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2007
    Posts
    586
    Tokens
    0

    Default Login Script Help ?

    Well my site has a proxy built in and Im making it password protected. I am currently using the password protected script located in the Cpanel.
    However Im wanting to make a login page for it instead of just the popup..

    Does any1 have a tut or link?

    Ive tried using the script in the Web Tutorial section called Mutli login however you can login etc and if u dnt login u can still access the page...

    help please
    +rep

  2. #2
    Join Date
    Jun 2006
    Posts
    4,832
    Tokens
    0

    Latest Awards:

    Default

    Use this, it's simple.

    PHP Code:
    <?php
    $password 
    "PASSWORD"// change PASSWORD to the password
    $entered $_POST['password'];
    if (
    $_POST['login']) {
    if (
    $entered != $password) {
    echo 
    "Sorry, wrong password"// error message if the pass is wrong
    } else {
    echo 
    "yay"//redirect with html if you want
    }
    } else {
    echo 
    "<form action=\"secure.php\" method=\"POST\">Password<br /><input type=\"password\" name=\"password\"><br /><br /><input type=\"submit\" name=\"login\" value=\"Enter\"></form>";
    }
    ?>
    Try that. Save as secure.php BTW, make the page name something like bzicusgxhcu828UDJCxXIsskdk.php for the proxy so nobody can find it.
    Last edited by Hitman; 30-01-2008 at 05:57 PM.

  3. #3
    Join Date
    Nov 2007
    Posts
    586
    Tokens
    0

    Default

    okay ty

  4. #4
    Join Date
    Apr 2006
    Location
    Salford
    Posts
    2,108
    Tokens
    0

    Latest Awards:

    Default

    Also what Hitman said is right, your better using frames when your logged in, like use just 1 frame and have something like



    PHP Code:
     <?php
    $password 
    "PASSWORD"// change PASSWORD to the password
    $entered $_POST['password'];
    if (
    $_POST['login']) {
    if (
    $entered != $password) {
    echo 
    "Sorry, wrong password"// error message if the pass is wrong
    } else {
    echo 
    "yay"//redirect with html if you want
    }
    }elseif (isset(
    $_entered['entered'])){
    header("Location: logged_in.php");
    ?>
    Last edited by Assassinator; 30-01-2008 at 06:05 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
  •