-1

以下代码在 Chrome 中正确重编,但在 IE 中不正确……为什么?

(...)
$x = mysql_real_escape_string($_POST['x']);
$x = mysql_real_escape_string($_POST['x']);
$x = mysql_real_escape_string($_POST['x']);
$x = mysql_real_escape_string($_POST['x']);
$MomentEvent = mysql_real_escape_string($_POST['MomentEvent']);

     {
    $registerquery = mysql_query("INSERT INTO users_event (x, x, x, x, x, MomentEvent) VALUES('".$x."', '".$_SESSION ['x']."', '".$x."', '".$x."', '".$x."', '".$confirm_code=md5(uniqid (rand())). "'); ");
    if($registerquery)
    {
        echo "<h1>XXXX</h1>";
        echo "<p>XXXXX</p>";          
        echo "<meta http-equiv='refresh' content='0;show2.php?MomentEvent=<?php echo $MomentEvent ?>' />";
}
    else
    {
        echo "<h1>Error</h1>";
        echo "<p>Sorry, your registration failed. Please go back and try again.</p>";    
    }

(...)
4

1 回答 1

2

我认为您最好使用该header()函数发送适当的 HTTP 标头进行重定向,如下所示:

header( "show2.php?MomentEvent=" . $MomentEvent );

如果您想坚持使用当前使用的方法,则需要包含该URL=属性,因此它看起来像这样:

<meta http-equiv='refresh' content='0;URL=show2.php?MomentEvent=<?php echo $MomentEvent; ?>' />
于 2013-08-04T02:00:20.803 回答