I've got a form where users begin their order. There are a few drop down boxes that cover additional aspects and the answers are either 'Y' or 'N'. The following page them reads these values using POST and does some calculations. Unfortunately, I'm not getting the values through and they are always showing as 'Y' regardless of the choice.
I didn't think I was doing anything wrong, but aparently something isn't quite right!
Here is my form:
<form id="form" name="form" method="post" action="handleorder.php">
<label for="Highlighted" class="label_left">Highlighted</label>
<select name="Highlighted" size="1" id="Highlighted">
<option value="Y">Yes</option>
<option value="N">No</option>
</select>
</div>
<div id="featuredwrapper">
<label for="Featured" class="label_left">Featured</label>
<select name="Featured" size="1" id="Featured">
<option value="Y">Yes</option>
<option value="N">No</option>
</select>
</div>
<div id="homepagewrapper">
<label for="Homepage" class="label_left">Homepage Featured</label>
<select name="Homepage" size="1" id="Homepage">
<option value="Y">Yes</option>
<option value="N">No</option>
</select>
</div>
<input type="submit" value="Submit" name="Submit" />
</form>
And here is the code on the following page that processes these values and stores them to local variables:
$highlighted = $_POST["Highlighted"];
$featured = $_POST["Featured"];
$homepage = $_POST["Homepage"];
Can anyone see why I'm not getting the proper value through? Also, I was considering using checkboxes but I wasn't sure how to process the array in PHP because I go on to do an If test on each of the 3 values. Would it be better to use checkboxes and if so, how would I then assign the value of the checkbox to a variable?
Thanks!