Select option with php

hi everyone.
im having trouble of how this would work, what im trying to do is to make sure the user pick one of the options in the form, if not it would pop up and error

	<select name="choices">
		<option selected value=""> please choose
		<option name="SA" value="san antonio"> San Antonio
		<option name="AU" value="austin"> Austin  </select>
		<br />
<input type="submit" name="submit" value="submit">

thx in advance

it should be enough to set it as required:
[php]

  <select name="choices" required>
     <option selected value=""> please choose</option>
     <option name="SA" value="san antonio"> San Antonio</option>
     <option name="AU" value="austin"> Austin</option>
  </select>
     <br />
[/php]

If you need/want more form validation (or IE < 10 support) you should look into jquery and the form validation plugin
http://jqueryvalidation.org/documentation/

thx, ill take a look

Sponsor our Newsletter | Privacy Policy | Terms of Service