I search for answers here but haven\'t found a solution. I have also added picture of the error. I want the data to go to the first drop-down list ( above the error) I think th
In MySQLi, the first parameter of a query needs to be the database connection. Also, there's no need to add a \
before the statement.
$sql = \mysqli_query("SELECT name From users");
should be $sql = mysqli_query($con, "SELECT name From users");
Note: replace $con with your database connection variable!
As you mentioned that you wanted the result from the database to go inside the select
form, simply adjust your code to look like this: