我收到以下错误:
Parse error: syntax error, unexpected '$studentNo' (T_VARIABLE)
有人可以告诉我这里出了什么问题吗?我读过有关此类错误的文章,并基于此,它通常发生在缺少括号、圆括号或分号时,但就我而言,我认为我没有错过任何内容..这与也许是变量本身?
if(isset($_POST['next'])){
$studentNo = $_POST['sn'];
if(!empty($_POST['sn'])){
$check = ("SELECT * FROM student_info WHERE SN="$studentNo"");
$check1 = mysqli_query($con, $check);
if(mysql_num_rows($check1) > 0){
$errors['sn'] = "Student number already exists";
}
}
}
慕婉清6462132