I didn't post my code because it was too long and complicated, but I'll put the important ones only, and we programmers always deal with complicated things anyway

.
Ok this is the form. It is located in my index.php:
HTML Code:
<form name="login" method="post" action="secure/clientsarea/index.php?id=logging_in">
Client's ID : <br>
<img src="images/spacer.gif" width="10" height="20">
<input type="text" size="15" name="un" align="top" class="input" maxlength="25"><br>
<img src="images/spacer.gif" width="10" height="20">
Password : <br>
<img src="images/spacer.gif" width="10" height="20">
<input type="password" size="15" name="pw" class="input" maxlength="25">
<br>
<img src="images/spacer.gif" width="10" height="20">
<input type="button" value="Log In" onClick="document.login.submit();">
</span>
</form>
Ok...now this is the login processing code. As you can see from the form above, it's secure/clientsarea/index.php?id=logging_in.
This index.php actually contains nothing but the design. The content is actually in logging_in.php . That's why there's id=logging_in. It's for including logging_in.php.
So this login processing code is in logging_in.php : (NOTE: the session is already started in the first line of the index.php. As I have said, this logging_in.php is just included in the index.php)
PHP Code:
<?php
include('../../php_library/lib_db.php');
$host = "secret";
$un = "secret";
$pw = "secret";
$db = "secret";
$conn = jw_connect_db($host,$un,$pw,$db);
$query = "SELECT * FROM clients_area WHERE username='{$_POST['un']}'";
$data = jw_fetch($query,$conn);
$theid = $data->username;
$password = $data->pw;
function log_in($thepw){
if(isset($_POST['un']) && isset($_POST['pw'])){
if($_POST['pw'] == $thepw){
$_SESSION['un'] = $_POST['un'];
$_SESSION['pw'] = $_POST['pw'];
return "correct";
}
else{
return "wrong";
}
}
else{
return "id wrong";
}
}
$iscorrect = log_in($password);
?>
Ok...as you can see, if the username and pw is correct, $iscorrect will contain the string "correct".
This code is the PHP code for writing the meta refresh tag. It is located in the head section of this logging_in.php:
PHP Code:
<?php
if($iscorrect == "correct"){
echo '
<meta http-equiv="refresh" content="0;url=index.php?id=controlpanel">
';
}
elseif($iscorrect == "wrong"){
echo '
<meta http-equiv="refresh" content="0;url=../../index.php?id=log_in&pwwrong=true">';
}
elseif($iscorrect == "id wrong"){
echo '
<meta http-equiv="refresh" content="0;url=../../index.php?id=log_in&idwrong=true">
';
}
?>
So the code above is for redirecting to specific pages depends on what the situation is. When I tried to login with Netscape/Mozilla, it redirected to index.php?id=controlpanel which means that the username and password that I entered were correct, and supposedly there will be session variables:
$_SESSION['un'] and $_SESSION['pw']
So we're redirected to index.php?id=controlpanel.
Before I do the next piece of explanation, I'll show you the code of the very first lines of the index.php:
PHP Code:
<?php
session_start();
$inside_nav = true;
if(empty($_GET["id"]))
{
$theid = "controlpanel";
}
else{
$theid = $_GET["id"];
}
if(isset($_SESSION['un'])){
$c_un = $_SESSION['un'];
}
?>
As you can see, the session is started here. Now, in the head section of the index.php, there's also a piece of PHP code:
PHP Code:
<?php
if(empty($_SESSION['un']) && empty($_POST['un']) && empty($_POST['pw'])){
echo '
<meta http-equiv="refresh" content="0;url=../../index.php?id=log_in&nosession=1">
';
}
?>
This code is for in case if someone accessed the index.php without logging in which means that there will be no $_SESSION['un'], no $_POST['un'] and no $_POST['pw']. If someone did, it should redirect to this index.php?id=log_in&nosession=1 which will display an error that the person must log in first.
Ok so what's going on between these browsers? When I log in with IE, from root's index.php which contains the form, the form is posted to /secure/clientsarea/index.php?id=logging_in. The username and pw is correct so it redirects to index.php?id=controlpanel and stays there. But in Netscape/Mozilla's case, after it redirected to index.php?id=logging_in, it redirects to index.php?id=controlpanel and then when the index.php checks whether $_SESSION['un'], which is the username, exists or not, it turned out that it doesn't exist while it's already set before. So it redirects to ../../index.php?id=log_in&nosession=1.
Phew...that was long...I know how it feels so a million..no a bazillion thanks for any help.

