# Php form validation

**URL:** <https://forum.kirupa.com/t/php-form-validation/306845>\
**Category:** Uncategorized\
**Created:** [March 23, 2010, 12:02pm UTC](https://forum.kirupa.com/t/php-form-validation/306845 "2010-03-23T12:02:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pucca](https://avatars.discourse-cdn.com/v4/letter/p/5f8ce5/32.png) [@pucca](https://forum.kirupa.com/u/pucca)\
**Post date:** [March 23, 2010, 12:02pm UTC](https://forum.kirupa.com/t/php-form-validation/306845/1 "2010-03-23T12:02:39Z")

</div>

hi there, I’ve created a form on my website. there’s quite alot of select fields. So, I’ve coded them like this:

```auto
      
      <option value="0" <?PHP if($ainsurance==0) echo "selected";?>>- Select -</option>
      <option value="1" <?PHP if($ainsurance==1) echo "selected";?>>Standard cover</option>
      <option value="2" <?PHP if($ainsurance==2) echo "selected";?>>Super cover</option>
      <option value="3" <?PHP if($ainsurance==3) echo "selected";?>>Executive cover</option> 

```

Now, i want the correct words to get displayed on the email that will be sent after the form validation; ie. Super cover or Standard cover, etc.  
At the moment the 1, 2 or 3 gets displayed.

What must I do so that the variable ($ainsurance) prints “Standard cover” and not 1, etc.?:-/

Thank you.
