Checkout Shipping Options if statement
I am trying to list 2 sets of options for shipping to our customers. Each draws from a recordset in the shipping tables. I want the US options to show up if the customer is in the US and all other options to show up if the customer is international based on a boolean in the shipping table that marks options as US.
My code isn't working. Both options show up no matter what the country ID is in the customer's table. It looks like a simple statement would work, but I'm not proficient in PHP.
What am I doing wrong?
------begin-----------
<?php if ($row_WAATKcustomers['CountryID'] != 236) { // Show if recordset not empty ?>
<select name="shipTypeList" id="shipTypeList">
<option value="">Choose Shipping</option>
<?php
do {
?>
<option value="<?php echo $row_rsShipTypeList['ShipTypeID']?>"><?php echo $row_rsShipTypeList['ShipTypeName']?></option>
<?php
} while ($row_rsShipTypeList = mysql_fetch_assoc($rsShipTypeList));
$rows = mysql_num_rows($rsShipTypeList);
if($rows > 0) {
mysql_data_seek($rsShipTypeList, 0);
$row_rsShipTypeList = mysql_fetch_assoc($rsShipTypeList);
}
?>
</select>
<?php } // Show if recordset not empty ?>
<?php if ($row_WAATKcustomers['CountryID'] = 236) { // Show if recordset not empty ?>
<select name="shipTypeList" id="shipTypeList">
<option value="">Choose Shipping</option>
<?php
do {
?>
<option value="<?php echo $row_rsShipTypeUS['ShipTypeID']?>"><?php echo $row_rsShipTypeUS['ShipTypeName']?></option>
<?php
} while ($row_rsShipTypeUS = mysql_fetch_assoc($rsShipTypeUS));
$rows = mysql_num_rows($rsShipTypeUS);
if($rows > 0) {
mysql_data_seek($rsShipTypeUS, 0);
$row_rsShipTypeUS = mysql_fetch_assoc($rsShipTypeUS);
}
?>
</select>
<?php } // Show if recordset not empty ?>
--end -