General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old April 10th, 2004, 04:34 AM
lilleydn lilleydn is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 11 lilleydn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question simple security ! but why does cancel let you in anyhow?

Hi I have inplemented some basic security which the code is below and works fine except one little flaw , The cancel button lets you in any how (okay perhaps it is big flaw)

Can some point me in the right direction?
Im happy to either close the browser or redirect to another page?

Any one suggest where and how i'd implement this.

<?php
include ('file:///F|/proj/htdocs/connection.php');
$authorized = FALSE;
if((isset($_SERVER['PHP_AUTH_USER']) AND isset($_SERVER['PHP_AUTH_PW'])) ){
mysql_select_db($DB_SECURITY_NAME);
$query = "SELECT username from $DB_USERS Where username ='{$_SERVER['PHP_AUTH_USER']}' and password = '{$_SERVER['PHP_AUTH_PW']}'";
//$query = "SELECT username from $DB_USERS Where username ='{$_SERVER['PHP_AUTH_USER']}' and password = PASSWORD('{$_SERVER['PHP_AUTH_PW']}')";
$result = mysql_query($query);
$row = mysql_fetch_array($result);
if($row){
$authorized = TRUE;
}
}
if(!$authorized){
header('WWW-Authenticate: BASIC realm ="My Web Site"');
header('HTTP/1.0 401 Unauthorized');
}
?>

Thanks & Regards
D.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > simple security ! but why does cancel let you in anyhow?


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 On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | 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 5 hosted by Hostway
Stay green...Green IT