<?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 '您已经提交过了,请不要重复提交'; } } ?>