Menu
I have a SQL query which returns the id (the primary key) and the name of a student.
Using a PHP loop I have auto-populated an HTML select drop down with the names and the user can select a student by name and then record a score for that student in a text input on the same form. That all works fine BUT …
The data is then POSTed to another php page to enter into the database. The results table needs the student’s id, not their name.
How can I get the id for the selected student and send as part of the POST?
Many thanks