Jump to content

how to make drop down list that read from database


kidphantom

Recommended Posts

I am new to PHP and currently trying to develop a website... i am stuck at one place.

Lets say i'm a user(mrX) that has 4 types of car that are Ferrari, Lamborghini, Evo and BMW. So, i will register to the system about my details and all of my car info such as their cc, transmission, plat number, engine capacity. Then, i will log on into the system and after log on, there will be a drop down list. If i pick Ferrari for example, under the drop down list there will be all the information about the car. The same on the other car also.

 

[attachment deleted by admin]

are you asking for the data to dynamically appear on the page?

if so you will need to include elements of javascript/ajax

 

create the list as normal, in the select add onChange with your js function

have the ajax bounce to anouther script to gather the data about the car etc and display in a hidden div

 

have a look here, this should help you loads http://www.switchonthecode.com/tutorials/simple-ajax-php-and-javascript

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.