1
function dropDownStudent()
{
$connect = connect();
$sql = "SELECT lastname, firstname, middleinitial FROM student";
$sql_connect = mysqli_query($connect, $sql);
}
<?php
include("process.php");
<?php
$result = dropDownStudent();
while($row=mysqli_fetch_array($result, MYSQL_ASSOC)){?>
<select name = "stud" required>
<? echo "<option> value='".$row['id']"'>" . $row['lastname'] . "," . $row['firstname'] . " " . $row['middleinitial'] . "</option>";?>
</select>
<?php
}
>
警告:?mysqli_fetch_array()預計參數1被mysqli_result,在C空給出:\ xampp \ htdocs \ capstone \ registerstudent.php上線11
我不知道爲什麼這是我的錯誤。我不知道我的參數1爲空