Drop down menu in PHP +MySQL | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Drop down menu in PHP +MySQL

I wanted to do a dynamic dropdown menu using PHP scripts and it will be connecting to MySQL database. I've been trying a lot of ways but they just didn't work out. I'll be using it for car rental system in which the dropdown menu should show the list of the types of cars from (car_types table in) database. Successfully created the dropdown menu but it is not connected to database. Helps?

5th Apr 2017, 3:00 PM
Frank Wei
Frank Wei - avatar
2 Answers
+ 3
@Frank could you provide us a piece of code to see what have you try so far?
5th Apr 2017, 3:56 PM
Geoffrey L
Geoffrey L - avatar
0
You can't do it in php you need javascript to listen user's event and display or hide a menu. You can also do it in CSS with lit tricks.
5th Apr 2017, 3:45 PM
Arnaud Perdoux
Arnaud Perdoux - avatar