I may not have made myself clear the other day but I have added an option to a form in my shopping cart checkout to ask if the customer wants the shipment insured. All I want to do is pass this new field/value to a PHP module which will check the value and intern either populate or not populate the $packageValue field which is sent to UPS.
My problem is, the value in $ship_insured is always false for each of my three options. Yes, No, not entered. I currently have the values set to equate Yes="1", No=" " and not entered=" " but I could use Yes, No and blank or whatever.
Here is my HTML code I added to my cart checkout form:
<tr>
<td class="contentckout"><b>Select Insurance:* Option</b></td>
<td class="contentckout" width="70%"><input type="hidden" style="color:#FFFFFF; background-color:#333333;" name="ship_insured" value="">
<SELECT ID = "ship_insured" style="color:#FFFFFF; background-color:#333333;">
<OPTION VALUE = "">--Select Option--</OPTION>
<OPTION VALUE = "1">Yes</OPTION>
<OPTION VALUE = "">No</OPTION>
</select>
</td>
</tr>
Here is where I am checking for if set in my PHP which is always false for some reason:
if(isset($_POST['$ship_insured'])){
$packageValue = $cart_subtotal;
}
else{
$packageValue = '';
}
This must be something very simple that I am not doing as I can't find another single post regarding this situation.
Thanks for your help even if it is pointing me to a place in a manual!!