Posted By

tylerhall on 11/30/-1


Tagged

states menu select


Versions (?)

Who likes this?

11 people have marked this snippet as a favorite

luxuryluke
samuraicoder
terriK
trickychicken
rendrag
wdeer
jfherring
The14thGOD
ba11in
seanpowell
yanseo


US states dropdown menu


 / Published in: HTML
 

  1. <select name="state" id="state">
  2. <option value="AL" <?PHP if($state=="AL") echo "selected";?>>Alabama</option>
  3. <option value="AK" <?PHP if($state=="AK") echo "selected";?>>Alaska</option>
  4. <option value="AZ" <?PHP if($state=="AZ") echo "selected";?>>Arizona</option>
  5. <option value="AR" <?PHP if($state=="AR") echo "selected";?>>Arkansas</option>
  6. <option value="CA" <?PHP if($state=="CA") echo "selected";?>>California</option>
  7. <option value="CO" <?PHP if($state=="CO") echo "selected";?>>Colorado</option>
  8. <option value="CT" <?PHP if($state=="CT") echo "selected";?>>Connecticut</option>
  9. <option value="DE" <?PHP if($state=="DE") echo "selected";?>>Delaware</option>
  10. <option value="DC" <?PHP if($state=="DC") echo "selected";?>>District of Columbia</option>
  11. <option value="FL" <?PHP if($state=="FL") echo "selected";?>>Florida</option>
  12. <option value="GA" <?PHP if($state=="GA") echo "selected";?>>Georgia</option>
  13. <option value="HI" <?PHP if($state=="HI") echo "selected";?>>Hawaii</option>
  14. <option value="ID" <?PHP if($state=="ID") echo "selected";?>>Idaho</option>
  15. <option value="IL" <?PHP if($state=="IL") echo "selected";?>>Illinois</option>
  16. <option value="IN" <?PHP if($state=="IN") echo "selected";?>>Indiana</option>
  17. <option value="IA" <?PHP if($state=="IA") echo "selected";?>>Iowa</option>
  18. <option value="KS" <?PHP if($state=="KS") echo "selected";?>>Kansas</option>
  19. <option value="KY" <?PHP if($state=="KY") echo "selected";?>>Kentucky</option>
  20. <option value="LA" <?PHP if($state=="LA") echo "selected";?>>Louisiana</option>
  21. <option value="ME" <?PHP if($state=="ME") echo "selected";?>>Maine</option>
  22. <option value="MD" <?PHP if($state=="MD") echo "selected";?>>Maryland</option>
  23. <option value="MA" <?PHP if($state=="MA") echo "selected";?>>Massachusetts</option>
  24. <option value="MI" <?PHP if($state=="MI") echo "selected";?>>Michigan</option>
  25. <option value="MN" <?PHP if($state=="MN") echo "selected";?>>Minnesota</option>
  26. <option value="MS" <?PHP if($state=="MS") echo "selected";?>>Mississippi</option>
  27. <option value="MO" <?PHP if($state=="MO") echo "selected";?>>Missouri</option>
  28. <option value="MT" <?PHP if($state=="MT") echo "selected";?>>Montana</option>
  29. <option value="NE" <?PHP if($state=="NE") echo "selected";?>>Nebraska</option>
  30. <option value="NV" <?PHP if($state=="NV") echo "selected";?>>Nevada</option>
  31. <option value="NH" <?PHP if($state=="NH") echo "selected";?>>New Hampshire</option>
  32. <option value="NJ" <?PHP if($state=="NJ") echo "selected";?>>New Jersey</option>
  33. <option value="NM" <?PHP if($state=="NM") echo "selected";?>>New Mexico</option>
  34. <option value="NY" <?PHP if($state=="NY") echo "selected";?>>New York</option>
  35. <option value="NC" <?PHP if($state=="NC") echo "selected";?>>North Carolina</option>
  36. <option value="ND" <?PHP if($state=="ND") echo "selected";?>>North Dakota</option>
  37. <option value="OH" <?PHP if($state=="OH") echo "selected";?>>Ohio</option>
  38. <option value="OK" <?PHP if($state=="OK") echo "selected";?>>Oklahoma</option>
  39. <option value="OR" <?PHP if($state=="OR") echo "selected";?>>Oregon</option>
  40. <option value="PA" <?PHP if($state=="PA") echo "selected";?>>Pennsylvania</option>
  41. <option value="RI" <?PHP if($state=="RI") echo "selected";?>>Rhode Island</option>
  42. <option value="SC" <?PHP if($state=="SC") echo "selected";?>>South Carolina</option>
  43. <option value="SD" <?PHP if($state=="SD") echo "selected";?>>South Dakota</option>
  44. <option value="TN" <?PHP if($state=="TN") echo "selected";?>>Tennessee</option>
  45. <option value="TX" <?PHP if($state=="TX") echo "selected";?>>Texas</option>
  46. <option value="UT" <?PHP if($state=="UT") echo "selected";?>>Utah</option>
  47. <option value="VT" <?PHP if($state=="VT") echo "selected";?>>Vermont</option>
  48. <option value="VA" <?PHP if($state=="VA") echo "selected";?>>Virginia</option>
  49. <option value="WA" <?PHP if($state=="WA") echo "selected";?>>Washington</option>
  50. <option value="WV" <?PHP if($state=="WV") echo "selected";?>>West Virginia</option>
  51. <option value="WI" <?PHP if($state=="WI") echo "selected";?>>Wisconsin</option>
  52. <option value="WY" <?PHP if($state=="WY") echo "selected";?>>Wyoming</option>

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: Vikkipyn on February 13, 2013

Thank you for this, I have it working but would like to know the next stage.... When someone selects a state, how do I provide the sales contact for that particular state?

You need to login to post a comment.