php缓存问题, 一个简单的登陆界面,在firefox下好用,在IE下不能用啊。本人第一次用php编程,请大家说详细点,不要见笑啊。下面是代码:
<?php
ob_start();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>登陆</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META HTTP-EQUIV=”Pragma” CONTENT=”no-cache”>
<LINK
href="images/public.css" type=text/css rel=stylesheet>
<LINK
href="images/login.css" type=text/css rel=stylesheet>
<STYLE type=text/css>
</STYLE>
<META content="MSHTML 6.00.2900.5848" name=GENERATOR>
</HEAD>
<BODY>
<?php
session_start();
$str=$_SESSION[check_pic];
$str=iconv('utf-8','gb2312',$str);//把编码格式为utf-8的session转换为编码格式为gb2312
echo $str ;
if($_POST['txtSN'])
{
 if($_POST['txtSN']==$str)
 {
  echo '验证码正确:',$str;
 }
 else{echo '验证码错误:',$str;}
} */
if (isset($_REQUEST['submitted'])) {
date_default_timezone_set('PRC');
$link = mysql_connect('localhost', 'root', '000');
mysql_query("set names 'utf-8'");
mysql_query("SET CHARACTER_SET_CLIENT=utf8");
mysql_query("SET CHARACTER_SET_RESULTS=utf8");
mysql_select_db('shopex',$link);
$result=mysql_query($sql);
if (!empty($_POST['txtUserName'])) {
$UserName =  trim(stripslashes($_POST['txtUserName']));
} else {
echo '<p><font color="red" size="+1">You forgot to enter your password!</font></p>';
echo   "<script>alert('\用户名不能为\空');</script>";
$UserName = FALSE;
}
if (!empty($_POST['txtUserPassword'])) {
$UserPassword =  trim(stripslashes($_POST['txtUserPassword']));
} else {
$UserPassword = FALSE;
echo   "<script>alert('\密码不能为\空');</script>";
}
if ($UserName && $UserPassword) {
$query0 = "SELECT username, userpass FROM sdb_operators WHERE username='$UserName' ";
$result0 = mysql_query ($query0) or trigger_error("Query: $query\n<br />MySQL Error: " . mysql_error());
if (@mysql_num_rows($result0) == 1) {
       $query = "SELECT username, userpass FROM sdb_operators WHERE (username='$UserName' AND userpass=md5('$UserPassword')) ";
   $result = mysql_query ($query) or trigger_error("Query: $query\n<br />MySQL Error: " . mysql_error());
}else { echo   "<script>alert('\用户名不存\在');</script>";
}
if (@mysql_num_rows($result) == 1) {
     ob_end_clean();
 header("Location: index.php\n");
              flush() ;            exit(); } else { echo    "<script>alert('\密码不正\确');</script>";
                       // ob_flush(); } } mysql_close();
}
?>
<DIV id=div1>
<form action=" " method="post" name="form1" target="_self">
  <TABLE id=login height="100%" cellSpacing=0 cellPadding=0 width=800
align=center>
    <TBODY>
      <TR id=main>
        <TD>
          <TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%">
            <TBODY>
              <TR>
                <TD colSpan=4>&nbsp;</TD>
              </TR>
              <TR height=30>
                <TD width=380>&nbsp;</TD>
                <TD>&nbsp;</TD>
                <TD>&nbsp;</TD>
                <TD>&nbsp;</TD>
              </TR>
              <TR height=40>
                <TD rowSpan=4>&nbsp;</TD>
                <TD>用户名:<?php $str?></TD>
                <TD>
                  <INPUT class=textbox id=txtUserName name=txtUserName>
                </TD>
                <TD width=120>&nbsp;</TD>
              </TR>
              <TR height=40>
                <TD>密 码:</TD>
                <TD>
                  <INPUT class=textbox id=txtUserPassword type=password
            name=txtUserPassword>
                </TD>
                <TD width=120>&nbsp;</TD>
              </TR>
              <TR height=40>
                <TD>验证码:</TD>
                <TD vAlign=center colSpan=2>
                  <INPUT id=txtSN size=4 name=txtSN maxlength="4">
                  &nbsp; <IMG src="yzh.php" > <A id=LinkButton1
            href="#">不清楚,再来一张</A></TD>
              </TR>
              <TR height=40>
                <TD></TD>
                <TD align=right>
                  <INPUT id=btnLogin type=submit value=" 登 录 " name=btnLogin>
  <input type="hidden" name="submitted" value="TRUE" />
                </TD>
                <TD width=120>&nbsp;</TD>
              </TR>
              <TR height=110>
                <TD colSpan=4>&nbsp;</TD>
              </TR>
            </TBODY>
          </TABLE>
        </TD>
      </TR>
      <TR id=root height=104>
        <TD>&nbsp;</TD>
      </TR>
    </TBODY>
  </TABLE>
  </form>
</DIV>
<DIV id=div2 style="DISPLAY: none"></DIV>
</CONTENTTEMPLATE>
</BODY>
</HTML>
为什么我把 header("Location: index.php\n");注释掉,还可以跳转。我知道是缓存的问题,把cookie还有临时文件都清除了,也不能用。请大家帮帮忙啊,着急中。
firefox与IE缓存到底怎么回事啊??