Hi, I'm writing a form to allow people to add entries to a mysql database table of used books.
I'm using the following code to populate scroll-down lists from the database for some fields of the form:
This works well, except for one problem. The author names in the mysql table are written in the following way: Lastname, Firstname
The names on the list are shown correctly, but when I try to fetch the data from the form to update the database, everything after the comma (mostly the first name, but sometimes also the middle name) does not show.
I tested it using simply
it shows only the following: Lastname,
It's my first time using PHP and I'm at a loss to what I should do to fix this. Is the problem with how the scroll-down list is generated?
Thanks in advance.