I am new in this page, and I came with my problem while looking for help from someone who is liable. I have my database with the name "e_exam" and a table named "course". The table has this columns (coursecode, department, level). Therefore, I used this code:
<select name="ex_coursecode">
<option disabled selected>-- Select Course Code --</option><br><br>
<?php
//display course code to dropdownlist
$course = mysqli_query($db, "SELECT coursecode From course"); // Use select query here
while($data = mysqli_fetch_array($course))
{
echo "<option value='". $data['coursecode'] ."'>" .$data['coursecode'] ."</option>"; // displaying data in option menu
}
?>
</select>
to display the values of "course" table to my dropdown and it works successfully. Now, I want to display the values of the "course" table to textfields. Someone should help me please.