I have multiple form fields passing properly, except this one:
<select name="Day1Equip1" class="small" >
<option value="" ></option>
$query3 = "SELECT * FROM EquipmentList ORDER BY Model";
$result3 = @mysql_query($query3);
while($line = mysql_fetch_array($result3))
{
$Model = $line["Model"];
$Item = $line["ItemNum"];
$ModelItem = $Model . "#" . $Item;
echo "<OPTION VALUE='$Model #$Item' >$Model #$Item</OPTION>";
}
</select>
When I view the HTML source, the option values are correct.
For example "TEST #1", "TEST #2", "TEST #99" etc.
Then, on posting the form javascript alert states $Day1Equip1 value is undefined while the php value returns null (i.e. '')
$Day1Equip1 = $_POST['Day1Equip1'] ;
print "$Day1Equip1"; //returns null value
I'm not sure what the problem is, but I'm wondering if problem is related to the fact that the value contains the character '#'.
If that's true, how do I fix it?
If it's not the #, anyone know what it might be?
I have other select boxes with similar code, and their values pass properly.