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
}
?>
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, null given in C:\xampp\htdocs\capstoneegisterstudent.php on line 11
i dont know why this is my error. i donw know my parameter 1 is null