因此,如果我填写所有字段并提交一切都很好,一旦我再次这样做,一切都很好,但是当我按下返回时,我可以看到之前和再次返回的内容,然后我可以看到第一次的结果。我希望我不能按回,或者我只能按一次。
<form action="Alauris.php" method="POST">
question1 <input type="text" name="answer1"><br>
question2 <input type="text" name="answer2"><br>
question3 <input type="text" name="answer3"><br>
question4 <input type="text" name="answer4"><br>
question5 <input type="text" name="answer5"><br>
question6 <input type="text" name="answer6"><br>
question7 <input type="text" name="answer7"><br>
question8 <input type="text" name="answer8"><br>
<input type="submit" value="Make">
</form>
<?php
if(isset($_POST['answer1'])&&isset($_POST['answer2'])&&isset($_POST['answer3'])&&isset($_POST['answer4'])&&isset($_POST['answer5'])&&isset($_POST['answer6'])&&isset($_POST['answer7'])&&isset($_POST['answer8'])){
$answer1=$_POST['answer1'];
$answer2=$_POST['answer2'];
$answer3=$_POST['answer3'];
$answer4=$_POST['answer4'];
$answer5=$_POST['answer5'];
$answer6=$_POST['answer6'];
$answer7=$_POST['answer7'];
$answer8=$_POST['answer8'];
if(!empty($answer1)&&!empty($answer2)&&!empty($answer3)&&!empty($answer4)&&!empty($answer5)&&!empty($answer6)&&!empty($answer7)&&!empty($answer8)){
$content = "asdasda" .$answer1. '<br>'."asdas".'<br>'.$answer2."5t64356456a".'<br>'.$answer3. "asdasdasda".$answer4."5t643564".$answer5. "aasda".'<br>'.$answer6."5t64356456as".$answer7. "asdasdas45".$answer8."5t64356456a45";
echo $content;
}else{
echo "fill all fields,my friend!";
}
}
谢谢 !