PHP
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   Web Development Archives Mailing Lists PHP

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Web Development Archives Sponsor:
  #1  
Old June 27th, 2008, 07:31 AM
Byron
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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>

Reply With Quote
  #2  
Old June 27th, 2008, 08:11 AM
Dan Shirah
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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']

Reply With Quote
Reply

Viewing: Web Development Archives Mailing Lists PHP > Help with login


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway