problem...urgent~
Moderator: General Moderators
problem...urgent~
i doin my college project...
it was a system for sales...
before it uploaded into my web hosting... everything work perfectly~
i can login, add customer everything w/o any problems..
after that, i upload it into my web hosting... but, the problem was occured!!! it was a nightmare... databasse login all is correct...
then i login... i can login at the first time.. everything work fine.. but suddenly an acccess denied message comes out~ and i can't login anymore... but sometimes can login... aisk...
my computer using mysql 3.0++ and my web hosting using mysql 4.0.18... is that a problem? i'm using session id...
gosh~~~ how~~
it was a system for sales...
before it uploaded into my web hosting... everything work perfectly~
i can login, add customer everything w/o any problems..
after that, i upload it into my web hosting... but, the problem was occured!!! it was a nightmare... databasse login all is correct...
then i login... i can login at the first time.. everything work fine.. but suddenly an acccess denied message comes out~ and i can't login anymore... but sometimes can login... aisk...
my computer using mysql 3.0++ and my web hosting using mysql 4.0.18... is that a problem? i'm using session id...
gosh~~~ how~~
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
http://www.the-kevin.org/mobilecore/login.php
staff id : 1000
password : kevin7
.... try login and hanging around...
staff id : 1000
password : kevin7
.... try login and hanging around...
Code: Select all
<?
session_start();
header("cache-control: private");
$id = (isset($_REQUESTї'id']) ? $_REQUESTї'id']: null);
if ($id==null) {
header('location:error_id.php?type=access_denied');
} else {
require("sqlauth.php");
$result = mysql_query("SELECT * FROM employee WHERE emp_id=$id",$db);
if (!isset($_SESSIONї'name'])) {
header('location:error_id.php?type=session_expired');
}
$flag=0;
while ($myrow = mysql_fetch_row($result)) {
if (($_SESSIONї'name']==$myrowї0]) && ($_SESSIONї'pass']==$myrowї12])) {
$flag=1;
<!-- START OF CONTENT -->
<!-- END OF CONTENT -->
}
}
if ($flag==0) {
header('location:error_id.php?type=access_denied');
}
}
?>all my pages have this coding... i know it was a mess...
Code: Select all
$flag=0;
while ($myrow = mysql_fetch_row($result)) {
if (($_SESSIONї'name']==$myrowї0]) && ($_SESSIONї'pass']==$myrowї12])) {
$flag=1;
<!-- START OF CONTENT -->
<!-- END OF CONTENT -->
}
}Code: Select all
if ($flag==0) {
header('location:error_id.php?type=access_denied');
}