kidphantom Posted April 9, 2011 Share Posted April 9, 2011 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] Quote Link to comment https://forums.phpfreaks.com/topic/233164-how-to-make-drop-down-list-that-read-from-database/ Share on other sites More sharing options...
dawsba Posted April 9, 2011 Share Posted April 9, 2011 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 Quote Link to comment https://forums.phpfreaks.com/topic/233164-how-to-make-drop-down-list-that-read-from-database/#findComment-1199179 Share on other sites More sharing options...
Eiolon Posted April 9, 2011 Share Posted April 9, 2011 Take a look at this tutorial: http://www.w3schools.com/ajax/ajax_database.asp Quote Link to comment https://forums.phpfreaks.com/topic/233164-how-to-make-drop-down-list-that-read-from-database/#findComment-1199270 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.