Month: January 2012

How to set the selected option of <select> tag from the PHP

There is a few ways to do this. The easiest way to do this is in fact really simple, you just need to add a keyword “selected” to the option that you want selected.
For example, if You have something like this:

<select>
 
<option value="1">Apple</option>
 
<option value="2">Samsung</option>
 
<option value="3">HTC</option>
 
</select>

Continue reading “How to set the selected option of <select> tag from the PHP”




Recent Posts

GiottoPress by Enrique Chavez