Drop Menu form to PHP/MySQL
four years ago
Hey!

I was wondering, how would the code work if i had a drop down menu in my form instead of text that the user types? Like for example I would like to have set items for a user to choose then run that with php/mysql to locate the info and display it. How would i set the variables? Thanks you guys, I'm not the best at programming yet (ur book helped A LOT, Larry), so this, I hope, will be common knowledge to you guys.

thanks in advance!

Norm
Re: Drop Menu form to PHP/MySQL
four years ago
There are examples in the book on how to do this. For creating a drop down list (aka pull-down menu) from the results of a MySQL query, see the chapter on Content Management (Chapter 11 in the 1st Edition). The add_url.php script (script 11.5) shows how to retrieve the url_types from a MySQL database, and create a pull-down menu from the results. The same script shows how to insert values selected from the pull-down menu into the database.

____________

Paul Swanson
Portland, OR
USA
____________


PHP Version 4.4.0
MySQL Version 4.1.22
Apache Version 1.3.37
Server OS: Linux Version 2.4.20-8
Workstation OS: Windows XP Pro SP2
Sorry, only registered users may post in this forum.

Click here to login