if (isset($_POST["Submit"])){$
php吧
全部回复
仅看楼主
level 1
if (isset($_POST["Submit"])){
$add_no = $_GET['no']+1;
$sql = "UPDATE exam SET q1_context='". $_POST["textdata"]."' Where stu_id ='".$_SESSION['stu_id']."'";
$stmt = $pdo->prepare($sql);
$stmt->execute();
$next_link = "location: exam_question.php?no=".$add_no;
header($next_link);
}
我想做的是當我按下submit,我會轉跳到同一頁,但?no是+1的,但永遠都加不到,想問為什麼
2022年03月05日 14点03分 1
level 10
用javascript跳转试试?
2022年03月15日 01点03分 2
level 1
我找到問題了,是我submit的form忘了加上?no了
2022年03月15日 01点03分 3
啊这
2022年03月15日 01点03分
1