How to Create PHP Drop Down Menu

48.3 هزار بار بازدید - 11 سال پیش - Follow this step by step
Follow this step by step tutorial to learn how to create PHP Drop down Menu.

Don't forget to check out our site http://howtech.tv/ for more free how-to videos!
ithowtovids - our feed
Facebook: howtechtv - join us on facebook
https://plus.google.com/1034403827176... - our group in Google+

A Dropdown list is a combination of items in a list. In the dropdown list menu only the title is visible but not the contents. The contents are shown only when the user activates it by a small arrow. The user may select an item from the menu by dragging the mouse from the menu title or by clicking the title and then clicking the item.
We can say a drop down list is a box containing a list of multiple items. A drop-down list is a list in which the selected item is always visible, and the others are visible on demand by clicking a drop-down button. The main advantages of a drop down list are to save space because the number of views is not limited by space.



Step #1 -- Open Dream viewer  
Open dream viewer and create new PHP file.


Step # 2 -- Step by step solution to create dynamic dropdown list
We are going to use some PHP to make a new dropdown of countries list.  
To create a dropdown html tag select is used where 'name' parameter is the name of tag and 'id' parameter is the id of dropdown.
select name="country" id="country"
Within the tag of select we define the value of dropdown using option tag within this tag 'value' parameter defines the value that value can be passed while submitting data.
option value="0" selected="selected"Select any Country../option
option value="pak"Pakistan/option
option value="russia"Russia/option
option value="india"India/option
/select

Step # 3 -- Saving you file
• After completing your code save as file name howtech.php

Step # 4 -- open php file on browser.
Open file in any browser.
11 سال پیش در تاریخ 1392/03/23 منتشر شده است.
48,321 بـار بازدید شده
... بیشتر