PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Instaed of this Query SELECT * FROM complaintType ORDER BY complaintType
write like this
SELECT complaintType, id, productService FROM complaintType ORDER BY complaintType
Hope this will work...
What is the need of this statement inside the option value statement : $productServiceList[$id] = $productService;
the line you mentioned is populating the array $productServiceList
to use with the javascript.
what you suggested had the same result. it still writes the id to the DB instead of the complaintType.
if I change the $id to $complaintType it populates correctly but breaks the array.