Jump to content

Archived

This topic is now archived and is closed to further replies.

brown2005

help with an automated price

Recommended Posts

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?

Share this post


Link to post
Share on other sites
This is the part you will use in your form processor.
[code]<?php
$featured = $_POST['featured'];

if($featured == "Yes")
     $price = $config_price_featured;
else
     $price = $config_price;
?>[/code]

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

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

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

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.