Skip to content
Advertisement

Tag: drop-down-menu

Select box with first option empty

How can I set the first option in my select box to an empty value? I’m getting the data from my DB, and I would like to set the option by default as “Please select one option”. Answer I found that ‘default’=>’Please select’ doesn’t work with the HTML5 required attribute. This does work: If you don’t like modern PHP syntax,

How do I set the selected item in a drop down box

Is there any way to set the selected item in a drop down box using the following ‘type’ code?