Masterslave
08-31-2007, 07:51 PM
Hi all,
I'm working on a web application and I'm almost done for the first version.
I check several browser to see how the application is showing it's html css.
But when I use Internet Explorer 5 I can't login and I don't know why.
Some explanation:
The code if you entered a valid username with password:
session_start();
if( isset( $_SESSION['login']) || $_SESSION['login'] )
{
header("Location: index.php?page=home");
}
else
{
if( $correctLogin )
{
$_SESSION['account_id'] = mysql_result($getUsr, 0, 0); //account id opslaan
$_SESSION['real_name'] = mysql_result($getUsr, 0, 3); //user opslaan vanuit het formulier in de sessie
$_SESSION['login'] = true; //als login klopt sessie login aanmaken
$setIsLoggedIn = "
UPDATE " . ACCOUNT_TABLE . "
SET
is_logged_in = '1'
WHERE account_id='" . $_SESSION['account_id'] . "'";
mysql_unbuffered_query( $setIsLoggedIn ) or die( mysql_error() );
header("Location: index.php?page=home");
}
}
In every page of the application there's checking a PHP file if your are logged in, if so than you may view the requested page else go to login.php
<?php
//auth
session_start();
if ( !isset($_SESSION['login']) || !$_SESSION['login'] )
{
header("Location: login.php");
}
?>
Allright, if I change header("Location: index.php?page=home"); into http://website.com then the header works fine, with index.php?page=home it redirects to login again.
So I think the //auth code isn't working well, this is only with IE5. With FF,IE6+,Opera7+ etc etc it is working well.
Can anybody tell me why IE5 doesn't login to my application?
Thanks in advance.
I'm working on a web application and I'm almost done for the first version.
I check several browser to see how the application is showing it's html css.
But when I use Internet Explorer 5 I can't login and I don't know why.
Some explanation:
The code if you entered a valid username with password:
session_start();
if( isset( $_SESSION['login']) || $_SESSION['login'] )
{
header("Location: index.php?page=home");
}
else
{
if( $correctLogin )
{
$_SESSION['account_id'] = mysql_result($getUsr, 0, 0); //account id opslaan
$_SESSION['real_name'] = mysql_result($getUsr, 0, 3); //user opslaan vanuit het formulier in de sessie
$_SESSION['login'] = true; //als login klopt sessie login aanmaken
$setIsLoggedIn = "
UPDATE " . ACCOUNT_TABLE . "
SET
is_logged_in = '1'
WHERE account_id='" . $_SESSION['account_id'] . "'";
mysql_unbuffered_query( $setIsLoggedIn ) or die( mysql_error() );
header("Location: index.php?page=home");
}
}
In every page of the application there's checking a PHP file if your are logged in, if so than you may view the requested page else go to login.php
<?php
//auth
session_start();
if ( !isset($_SESSION['login']) || !$_SESSION['login'] )
{
header("Location: login.php");
}
?>
Allright, if I change header("Location: index.php?page=home"); into http://website.com then the header works fine, with index.php?page=home it redirects to login again.
So I think the //auth code isn't working well, this is only with IE5. With FF,IE6+,Opera7+ etc etc it is working well.
Can anybody tell me why IE5 doesn't login to my application?
Thanks in advance.