...

View Full Version : IE & Firefox with Session



ooiyh
09-02-2006, 02:32 AM
Hi,

Is there anything that I miss out in my code? When I used IE the session['err'] will show that it does not exist. But in Firefox, the session['err'] will show that it Exist? Why is this so? I am very puzzle. :confused:

This are my codes.


<?php session_start();?>
<html>
<head>
<title>test</title>
</head>

<body>

<p>
<?php
if(isset($_SESSION['err']))
{
$_SESSION['err'] = "Exist";
echo $_SESSION['err'];
}
else
{
$_SESSION['err'] = "Does not Exist";
echo $_SESSION['err'];
}
?>
</p>
<form id="form1" name="form1" method="post" action="./redirect.php">
<p>test
<input name="test" type="text" id="test" />
</p>
<p>
<input type="submit" name="Submit" value="Submit" />
</p>
</form>
<p>&nbsp;</p>
</body>
</html>



<?php
session_start();
$test = "";
$test = $_POST['test'];

if($test == "")
$_SESSION['err'] = "test";

header('Location: ./test.php');
?>

rafiki
09-02-2006, 02:59 AM
help spread firefox
www.spreadfirefox.com



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum