- <?php
- session_start();
- $_SESSION['num'] = 0;
- if(isset($_POST['action'] && $_POST['action']=='submit')){
- if($_SESSION['num'] == 0){
- echo '<a href="'.$_SERVER['PHP_SELF'].'">'请再次尝试</a>;'
- $_SESSION['num'] = 1;
- }else{
- echo '您已经提交过了,请不要重复提交';
- }
- }
- ?>
- //该片段来自于http://www.codesnippet.cn/detail/260720134838.html
来源: http://www.codesnippet.cn/detail/260720134838.html