function dropDownStudent()
{
$connect = connect();
$sql = "SELECT lastname, firstname, middleinitial FROM student";
$sql_connect = mysqli_query($connect, $sql);
}
<?php
include("process.php");
>Daten in Combobox werden mit Daten in der Datenbank gefüllt
<?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
}
>
Warnung:? Mysqli_fetch_array() erwartet 1 Parameter MySQLi_Result, null Bereichen gemäß c: \ xampp \ htdocs \ capstone \ registrystudent.php in Zeile 11
Ich weiß nicht, warum das mein Fehler ist. ich weiß nicht, dass mein Parameter 1 null ist