Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

147
Views
How can I Display database table record in textfields by clicking a value in dropdown list

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.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!