Jump to content


Photo

help with an automated price


  • Please log in to reply
1 reply to this topic

#1 brown2005

brown2005
  • Members
  • PipPipPip
  • Advanced Member
  • 943 posts

Posted 05 May 2006 - 08:38 AM

i have a select box on my form that says:

Featured and Yes and No are the options....

when it is at No i want a price field to be $config_price and when yes is selected i want the price to change to $config_price_featured

any ideas?


#2 jeremywesselman

jeremywesselman
  • Members
  • PipPipPip
  • Advanced Member
  • 154 posts
  • LocationIndependence, KY

Posted 05 May 2006 - 09:00 AM

This is the part you will use in your form processor.
<?php
$featured = $_POST['featured'];

if($featured == "Yes")
     $price = $config_price_featured;
else
     $price = $config_price;
?>

And you would set up your select box like this.
...
<select name="featured">
<option value="Yes">Yes</option>
<option value="No">No</option>
</select>
...

I think this is what you're lookin' for.

[!--coloro:#990000--][span style=\"color:#990000\"][!--/coloro--]Jeremy[!--colorc--][/span][!--/colorc--]




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users