Maison  >  Article  >  développement back-end  >  php封存submit内容之后禁止刷新

php封存submit内容之后禁止刷新

WBOY
WBOYoriginal
2016-06-13 11:51:27728parcourir

php保存submit内容之后禁止刷新
$strsql = "INSERT INTO `xxx` (`aaa`) VALUES ('".$_POST["bbb"]."','".$_POST["ccc"]."',,now())";

[email protected]_query($strsql,$my_con);
[email protected]_affected_rows();
Testecho ($y.mysql_affected_rows()." $errcode ".$strsql);  #debug
mysql_sql_log($strsql,mysql_affected_rows(),$_SERVER['SCRIPT_NAME'].":".__LINE__);
if($maxrow>0){
$insertflag =1;
}

echo '<script>location.href="6612.php?inserted=1"</script>';

重点是最后一句,在insert完之后,重新载入一次页面,并且加上参数,然后在页面上写个判断,又GET的参数并且为1的时候disabled。






Déclaration:
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn
Article précédent:PHP怎么取XML中数据Article suivant:php大数计算,该怎么解决