Drop down lists
Im assuming these are done in PHP hence posting here.
Many a time when I have a template it comes with a dropdown list facility. Eg the latest one im working with has one that you use to select different brands of goods/different categories. If this does not make sense I can pot th site but don’t want to keep posting urls and look like im trying to promote sites
Now because im not aufait with this I tend to just delete the dropdown box which is a shame. How do I work with this to make it work? I assume I need a database I am sure with all the items entered in certain categories? Can someone point me to a tutorial of any sort or free code? I don’t mind teaching myself I just need to find a good resource online to help me do just that.
Thanks
greg posted this at 16:45 — 26th August 2009.
He has: 1,581 posts
Joined: Nov 2005
Here's the basics of the drop down list
If you have never worked with forms before you might be better starting on that site's form tutorial rather than jumping straight into a type of form input.
Here's the PHP you use with the form
The tutorials are pretty basic, but certainly enough to get you going and understanding the basics of HTML for forms and PHP receiving the form data.
__________________
The basics in a nut shell is you have a form where a user inputs data, whether a text input, password or drop down. Then that data when "submit" is pressed is sent to another page. The next page gets the sent data with PHP, where you can do what you want with it - search a database, add to a database etc.
The best way is to practice somewhere no public and where you can just play with the outputs.
And of course when using user inputted data always be cautious. Make sure you use security and check their inputs for anything, especially when it's querying a database.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.