It is caused mostly because the php page operates posted/geted data from another page,for example,the check login page. You can write the php file without outputing anything to the browser,just jumping to another page when finishing dealing with the posted/geted data.It is just a simple php promgram file without any html tags.
比如A页面点击一个按钮后传递一个变量到B页面,B页面根据这个变量显示相应的内容。。-------------------------------------- you can do this: page A post data to page C,page C is like: <?php ....//operate the data header('location:B.php'); ?>//notice:there is not any html tags in page Cthen when you back to A from B,the browser won't have any warnings.
add one page between page A to page B.....and the page should not have html tags as <html><head>..</head><body>...</body></html>it only contains <?php....?>
You can write the php file without outputing anything to the browser,just jumping to another page when finishing dealing with the posted/geted data.It is just a simple php promgram file without any html tags.
you can do this:
page A post data to page C,page C is like:
<?php
....//operate the data
header('location:B.php');
?>//notice:there is not any html tags in page Cthen when you back to A from B,the browser won't have any warnings.
B页面
<?
//处理从A页发送过来的数据
//处理完后跳转到C页面或者仍然跳转到B页面,如:
echo "<script>location.href='c.php';</script>";?>
大家的意思是让你提交完表单后做一个页面跳转,用HEADER定向或
JS的echo "<script>location.href=\"pageB.php\"</script>";
尽可能的不要回到提交的页面
echo "<input type=\"hidden\" name=\"id\" value=\"$row[0]\">";
echo "<input type=\"hidden\" name=\"pnum\" value=\"$row[4]\">";
echo "<input type=\"hidden\" name=\"classid\" value=\"$row[3]\">";
echo "<input type=\"submit\" name=\"Submit\" value=\"查询\">";
echo "</form>
然后再页面B里,也就是query_exam_detail.php里开头有以下代码:$_SESSION["contest_id"]=$_POST['id'];
$classid=$_POST['classid'];
$_SESSION["pnum"]=$_POST['pnum'];并且这个页面是要用到变量$classid的。
现在就是如果在页面B的时候点后退就会发生错误请问怎么改呢
header("Location: xxx.php?classid=$classid");