HTML dropdown only inputs last row to my SQL

Course Queries Syllabus Queries 3 years ago

2.75K 1 0 0 0

User submissions are the sole responsibility of contributors, with TuteeHUB disclaiming liability for accuracy, copyrights, or consequences of use; content is for informational purposes only and not professional advice.

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 3 years ago


I am a newbie to PHP and trying to create a web-interfaced feedback application. I have created a table in HTML with 5 rows and have scripted it to mysql via PHP file. When I hit submit, the last row entries are added 5 times instead of all rows giving single input each.

HTML form

 action="insert.php" method="post">
 border="3">

Faculty NameSubjectSubject KnowledgeTeaching 

MeathodlogyPunctualitySyllabus CoverageResponsiveness to Queries


 
     name="staff">
    value="staff1">Staff1
    value="staff2">Staff2
    value="staff3">Staff3
    value="staff4">Staff4
    value="staff5">Staff5
 
  
   name="subject">
    value="sub1">Sub1
    value="sub2">Sub2
    value="sub3">Sub3
    value="sub4">Sub4
    value="sub5">Sub5
 
 
    name="Rate1">
    value="1">1
    value="2">2
    value="3">3
    value="4">4
    value="5">5
   
 
 
    name="Rate2">
    value="1">1
    value="2">2
    value="3">3
    value="4">4
    value="5">5
   
  
  
    name="Rate3">
    value="1">1
    value="2">2
    value="3">3
    
                                                
0 views
0 shares

No matter what stage you're at in your education or career, TuteeHUB will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.

Similar Forum