|
-
Searching MySQL db with PHP...
You can put the amount of knowledge of PHP I have in a thimbel...
Anyway, I have set up a MySQL db (Using PHPMyAdmin), with a single table, and four columns: Year, Make, Model, Link.
On the main page, I will have a two selects (dropdown menus): Make, and Model.
The Model select will be empty, until a Make has been selected.
The first time the page loads, I need to populate the Make select with all available [Make] options stored in the db. Then once a Make has been chosen (onChange), I need to populate the Model select with all available [Model] options stored in the db.
Then, once the Make and Model have been chosen, the PHP script will return that Make and Model for all years stored in the db, along with a link to each. In other words, I will need to search the db by each key*.
I have no idea how to get the appropriate values out of the db, and populate an HTML form with them. I suppose, I have to turn form element names and/or values into PHP variables, but any help is appreciated. Do I use arrays, or what?
I started this a while back, but got sidetracked...
thanks,
-james
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|