Help with login

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey, I think this should be working but it doesn't seem to be.

<?php
/* Admin Login Page
TS Achilles Website
Created by Byron Glover */

require("config.php");
require("functions.php");

// Check for previous authentication
if (isset($_COOKIE["auth"]) && isset($_GET["page"]))
    {
    include($_GET["page"].".php");
      die();
    }

if (isset($_COOKIE["auth"]) && !isset($_GET["page"]))
    {
    include($GLOBALS['admin_index']);
    die();
    }
// Handle login form data that has been self-$_POSTed
if (
    $GLOBALS['admin_log_user'] == $_POST["user"]
    &&
    $GLOBALS['admin_encrypt_pass'] == md5($_POST["password"])
    )    {
        setcookie("auth", "1", time()+900);
        header("Refresh: url=".$_SERVER['PHP_SELF']);
        }

?>

                <html>
                <form method="post" action="login.php">
                <table align="center">
                <td><div class="h1 underline">Administrator Login</div>
                <tr><td><div class="plaintext">Username: </div></td><td>
                <tr><td><input name="username" type="text"
width=25></td></tr>
                <tr><td><div class="plaintext">Password: </div></td><td>
                <tr><td><input name="password" type="password"
width=25></td></tr>
                <tr><td colspan=2 align="center"><input name="Login"
type="submit"></td></tr>
                </table>
                </form>
                </html>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux