First File - index.php

header("Pragma: no-cache");
header("Cache-Control: no-cache, must-revalidate");
if(empty($check)) {
$page = "index.php?check=1";
header("Location: $page");
setcookie("testcookie", "1");
else {
if(empty($testcookie)) {   
echo ("<font face=arial size=4 color=red>Problem detected!</font><br><br>" .
"<b>Your browser does not support cookies!</b><br><br>" .
"<font size=2>Enable cookies and try again.</font>");
else {
$page = "login.php";
header("Location: $page");

Second File - login.php

header("Pragma: no-cache");
header("Cache-Control: no-cache, must-revalidate");
<title>Forecast Tool - ATL Key Account</title>
<form method="post" action="temp.php" name="form_login">
<tr><td><font size="2" face="Arial, Helvetica, sans-serif">Login:</font></td>
<td><input type="text" name="login" size="8" maxlength="8"><br></td></tr>
<tr><td><font size="2" face="Arial, Helvetica, sans-serif">Password:</font></td>
<td><input type="password" name="senha" size="8" maxlength="8"></td></tr>
<tr><td><input type="reset" name="botao" value="Clear"></td>
<td><input type="submit" name="submit" value="Login"></td></tr>

Everything works fine when I use these two files with Apache running on Solaris, RH, 
Windows 98, Windows ME and Windows NT 4.0. The main objective is to test if the 
browser supports cookies of course. But... If I use Microsoft IIS with these two files 
it never works! The cookie is NEVER sent to the browser (this was verified using 
Netscape's option to warn about new cookies coming in) and obviously I always receive 
the error message stating that my browser doesn't support cookies! Impossible! The 
same application running on two different servers produces different results? Is it a 
Thanks in advance!!!

Best regards,

Fábio Ottolini

Reply via email to