|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Help with login
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($_CKIE["auth"]) && isset($_GET["page"])) { include($_GET["page"].".php"); die(); } if (isset($_CKIE["auth"]) && !isset($_GET["page"])) { include($GLBALS['admin_index']); die(); } // Handle login form data that has been self-$_PSTed if ( $GLBALS['admin_log_user'] == $_PST["user"] && $GLBALS['admin_encrypt_pass'] == md5($_PST["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> |
|
#2
|
|||
|
|||
|
Help with login
>
Hey, I think this should be working but it doesn't seem to be. > $_GET["page"] $_SERVER['PHP_SELF'] What is the error message you are getting? And, why are you using different quotes throughout all of your script? I believe you should use single quotes for all of your server generated variables like $_GET['page'], $_SERVER['PHP_SELF'], $_PST['user'] |
![]() |
| Viewing: Web Development Archives > Mailing Lists > PHP > Help with login |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|