heyy i have a page with a fair sized form and two dropdown boxes (select options), for the php validation i am quite simply using if($_POST['boxOne'] == 0){ $errors[] = ""; } the boxes dont have labels so the first <option> is the title/label with a value of 0 so this should catch that, works fine for one but not for the other. any ideas. the files ascoiated with the problems are failry hefty ones so if you want to view the entire code just ask, else this is the code in question.
<tr>
<td height="30"></td>
<td height="30">
<input type="text" name="minPPW" class="propertyHalfInput" placeholder="Min PPW"
value="<?php echo $form->value("minPPW") ?>"/>
*
[b]<select name="available" class="propertyDropDownHalf" id="available">
<option value="0">Available For</option>
<option value="11/12">2011/12</option>
<option value="12/13">2012/13</option>
<option value="13/14">2013/14</option>
<option value="14/15">2014/15</option>
</select>[/b]
*
</td>
<td width="10" height="30"></td>
<td height="30" colspan="4">
<span>TV Subscribtion:</span>
<input type="hidden" name="billTV" id="billTV" value="0"/>
</td>
<td width="5" height="30"></td>
<td width="25" height="30">
<input name="billTV" type="checkbox" id="billTV" value="1" />
</td>
</tr>
<tr>
<td height="30"></td>
<td height="30">
<input type="text" name="maxPPW" class="propertyHalfInput" placeholder="Max PPW"
value="<?php echo $form->value("maxPPW") ?>"/>
*
[b]<select name="propType" class="propertyDropDownHalf" id="propType">
<option value="0">Property Type</option>
<option value="House">House</option>
<option value="Flat">Flat</option>
<option value="Halls">Halls</option>
</select>[/b]
*
</td>
<td width="10" height="30"></td>
<td height="30" colspan="4">
<span>Internet Subscription:</span>
<input type="hidden" name="billNet" id="billNet" value="0"/>
</td>
<td width="5" height="30"></td>
<td width="25" height="30">
<input name="billNet" type="checkbox" id="billNet" value="1" />
</td>
</tr>
and
if($_POST['propType'] == 0){
$form->setError("type", "* The property Type is required");
}
if($_POST['available'] == 0){
$form->setError("available", "* Availability is required");
}