Why?

He has: 1,380 posts

Joined: Feb 2002

Anyone have any idea why some very basic PHP would fail in IE?

I can't give you a link, but the code looks like:

login.php

<?php

session_start
();

...
check to see if session exists, if so forward to main page...

...
some header stuff...
?>

...a form with POST action=http://sub.site.com/index.php...
'

index.php

<?php

session_start
();

...
check for session, if not present, force redirect...

$username = strip_tags($_POST['user']);
$password = md5(strip_tags($_POST['pass']);
$lauth = strip_tags($_POST['lauth']);
$login = strip_tags($_POST['login']);

if ((
$lauth != NULL) && ($login == 'go')) {
   
$message = go_login($username, $password);
    ...if
$message is anything besides 1 or NULL, kicks out as a bad login and does redirect ...
}

...
some header stuff...

?>


...main content....
'

I know that's kind of vague, but it has to do with the login process. At login.php, the user inputs their information, which is POST-ed to index.php, for processing. The login.php page displays, but upon data submission, IE freaks out and either displays a blank screen or just redirects to the login page.

I should stress that this works in FF, and I don't really see ANY reason why it shouldn't work in IE. Other pages that don't involve this cross-page posting work and display fine in IE.

Where do I start? I initially thought it might be because I was using action="<?php echo $PHP_SELF?>"' for the login form, and doing the processing within the login.php page... but I changed it, and it still doesn't work (in IE...it works either way in FF).

The only other thing that I can think of that's even remotely relevant is that these scripts are running on a subdomain ([url]http://consumer.domain.com)[/url], and they're using includes filies from the non-html directory of the root domain... for example, if the subdomain was located at: /www/domain/sub/html/, then the includes files are located at: /www/domain/inc, with the web files for the main domain at /www/domain/html/

Sometimes I hate life.

Thanks for any much-needed help. I hope I made sense.