weird problem?
Posted: Thu Nov 27, 2003 4:07 pm
Webserver setting: Php version 4.1.2
I am writing a login page by using $_SESSION[].
I tested it on my local computer(localhost), it works fine.
However, when I uploaded to the webserver, it doesn't work propertly. It displayed the error message that what I created "Failed to login, this is a restricted page".
I can login into the first page, when I click the second page links, it can't log me in unless I refresh this page several times.
For example, I have 3 pages, login.php, firstpage.php, and secondpage.php
Code on firstpage.php and secondpage.php
if(!isset($_SESSION['valid_admin'])) {
//Error message if it failed to login.
die("Failed to login, this is a restricted page.");
}
print("Logined successful. <i>Welcome < ".$_SESSION['valid_adm']."> </i>");
I type the username and password on login.php,
I can log in to firstpage.php,
when I click the link of secondpage.php on firstpage.php,
I cannot log in until I clicked the "Refresh" button on IE several times.
I don't know what causes this problem? Is it because my webserver is too slow since this webserver have a lot of traffic?
Did anyone know what happened? Please, help me if you knew the solution.
Thank you,
Raindrop
I am writing a login page by using $_SESSION[].
I tested it on my local computer(localhost), it works fine.
However, when I uploaded to the webserver, it doesn't work propertly. It displayed the error message that what I created "Failed to login, this is a restricted page".
I can login into the first page, when I click the second page links, it can't log me in unless I refresh this page several times.
For example, I have 3 pages, login.php, firstpage.php, and secondpage.php
Code on firstpage.php and secondpage.php
if(!isset($_SESSION['valid_admin'])) {
//Error message if it failed to login.
die("Failed to login, this is a restricted page.");
}
print("Logined successful. <i>Welcome < ".$_SESSION['valid_adm']."> </i>");
I type the username and password on login.php,
I can log in to firstpage.php,
when I click the link of secondpage.php on firstpage.php,
I cannot log in until I clicked the "Refresh" button on IE several times.
I don't know what causes this problem? Is it because my webserver is too slow since this webserver have a lot of traffic?
Did anyone know what happened? Please, help me if you knew the solution.
Thank you,
Raindrop