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]

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.