I solved your problem. You can add Combobox like this.
Follow the steps -
1. Add this code at the subject input place.
<?php
$cser=mysqli_connect("localhost","root","","test") or die("connection failed:".mysqli_error());
$result = mysqli_query($cser,"SELECT pname FROM crud2") or die(mysql_error());
if (mysqli_num_rows($result)!=0)
{
echo 'Product Name : <select name="pname">
<option value=" " selected="selected">Choose one</option>';
while($drop_2 = mysqli_fetch_array( $result ))
{
echo '<option value="'.$drop_2['pname'].'">'.$drop_2['pname'].'</option>';
}
echo '</select>';
}
?>
2. Now change the test database to, your database or add your config file.
2. Change the crud2 table name to your table name.
3. Change pname to the students' column name.
In this way, you can add Combobox in your website HTML form using PHP and Mysql database tables.
Benefits -
1. Select data and display it in Combobox.
2. Insert data using select name="pname" . Change pname according to your column name.