Php disables refresh after saving the submit content. Copy the code as follows: $ strsqlINSERTINTO 'XXX' ('aaa') VALUES (. $ _ POST [bbb]... $ _ POST [ccc]., now (); $ result @ mysql_query ($ strsql, $ my_con); $ maxrow @ mysql_affe
The code is as follows:
$ Strsql = "insert into 'XXX' ('aaa') VALUES ('". $ _ POST ["bbb"]. "','". $ _ POST ["ccc"]. "', now ())";
$ Result = @ mysql_query ($ strsql, $ my_con );
$ Maxrow = @ mysql_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";
The focus is on the last sentence. after the insert operation is complete, the page is reloaded with parameters, and a judgment is written on the page. if the GET parameter is set to 1, the page is disabled.
The code is as follows:
The http://www.bkjia.com/PHPjc/743579.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/743579.htmlTechArticle code is as follows: $ strsql = "insert into 'XXX' ('aaa') VALUES ('". $ _ POST ["bbb"]. "','". $ _ POST ["ccc"]. "', now ()"; $ result = @ mysql_query ($ strsql, $ my_con); $ maxrow = @ mysql_affe...