我对这段代码有疑问:
<?php echo "<meta http-equiv='refresh' content='3;search_enroll.php?&id='.$id />"; ?>
我正在使用此代码将此页面中的值传递到此页面,$id
并且它不是空的,我回显了$id
它并保存了该值。这是接收端的代码:
<?php
if (isset($_POST['SearchS'])){
$id = $_POST['searchstudent'];
}else if(!empty($_GET['id'])){
$id = $_GET['id'];
}
else if(!empty($_GET['student_id'])){
$id = $_GET['student_id'];
}
else {
$id= $_REQUEST['student_id']; <--- this is line 37
}
?>
目前有这个错误说明,我希望第二条else
语句应该检索代码。
Notice: Undefined index: student_id in C:\xampp\htdocs\Thesis\search_enroll.php on line 37