Copy link to clipboard
Copied
Using DW CS4
Have a page with a select that is populated from a recordset that lists products and i am trying to have the select show certain products as being SOLD OUT!
Here is the code i have
<?php
/*START_PHP_SIRFCIT*/ if
($row_rs_options['OptionPriceincrement']!="0"){ ?>
<option value="<?php echo
$row_rs_options['ProductOptionID']?>"><?php echo
$row_rs_options['OptionName']?> $<?php echo
$row_rs_options['OptionPriceincrement']; ?></option><?php } else
echo'<option class="style1" value=""><?php echo
$row_rs_options[\'OptionName\']?> ITEM SOLD OUT!</option>'
/*END_PHP_SIRFCIT*/ ?>
If my else statement is triggered, i want the select option to show the OptionName where the OptionPriceincrement is == to 0 and also the text ITEM SOLD OUT!
With the code as i have it, only the ITEM SOLD OUT! shows in a browser.
You can see this here http://www.comfycampers.info/products.php
Go to Tour Bon Ton Roulet and view the select
thanks for your help,
-Jim Balthrop
Copy link to clipboard
Copied
I figured out my mistake on the code.
<?php /*START_PHP_SIRFCIT*/ if ($row_rs_options['OptionPriceincrement']!="0"){ ?>
<option value="<?php echo $row_rs_options['ProductOptionID']?>"><?php echo $row_rs_options['OptionName']?> $<?php echo $row_rs_options['OptionPriceincrement']; ?></option><?php }
else { ?><option class="style1" value=""><?php echo $row_rs_options['OptionName']; ?> SOLD OUT!</option>
<?php } /*END_PHP_SIRFCIT*/ ?>
You can see this here http://www.comfycampers.info/products.php
Go to Tour Bon Ton Roulet and view the select
thanks for your help,
-Jim Balthrop
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more