Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 05-22-2005, 12:27 PM Adding to values
Harvey's Avatar
Super Spam Talker

Posts: 901
Name: Harvey C
Location: Brighton, UK
Trades: 0
I have the value "amount" defined by an invisible field as "16".

I need to have it so that if a customer chooses the second option, "within 7 days", the value of "amount" will increase by 10.

Here is what I have so far:

HTML Code:
<select name="amount" id="amount">
                <option value="???">Guaranteed within 30 days</option>
                <option value="???">Guaranteed within 7 days (add $1 CPM)</option>
              </select>
I know I need to put something in place of the ???'s, but not sure what. The first one needs to say "Leave the amount as it is", and the second one needs to say, "Add 10 to the amount".

Any help would be greatly appreciated.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Harvey is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-22-2005, 12:52 PM
leavethisplace's Avatar
Ultra Talker

Posts: 297
Trades: 0
Surely if the amount is always 16, you'd simply have 26 in the second select option, and 16 in the first.... you're questions does not make much sense and has little, if any, relevance to PHP.

However, if you mean you want to dynamically create this, then the mathematical functions can be found in the PHP Manual
__________________
A lie gets halfway around the world before the truth has a chance to get its pants on. - Sir Winston Churchill

Please visit my sites:
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
leavethisplace is offline
Reply With Quote
View Public Profile
 
Old 05-22-2005, 06:11 PM
Harvey's Avatar
Super Spam Talker

Posts: 901
Name: Harvey C
Location: Brighton, UK
Trades: 0
Ah. Wrong forum, then. Apologies.

I can't have the second value as 26, but need to add 10 instead. This is because underneath I will need another menu that will have the same/similar effect.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Harvey is offline
Reply With Quote
View Public Profile
 
Old 05-22-2005, 08:53 PM
metho's Avatar
Ultra Talker

Posts: 481
Location: Gold Coast - Brisbane QLD, Australia
Trades: 0
leavethisplace is quite right, so far you have not explained any valid reason for not simply entering '16' and '26' as values. "underneath I will need another menu that will have the same/similar effect", doesn't make any sense as to why you need the form constructed this way.
__________________
I do
Please login or register to view this content. Registration is FREE
based.
Spend a lot of time in
Please login or register to view this content. Registration is FREE
.
And
Please login or register to view this content. Registration is FREE
chews up the rest.
metho is offline
Reply With Quote
View Public Profile Visit metho's homepage!
 
Old 05-23-2005, 04:00 AM
Harvey's Avatar
Super Spam Talker

Posts: 901
Name: Harvey C
Location: Brighton, UK
Trades: 0
I need it constructed in this way so that the customer can choose multiple options, so they can use two different drop menus to change the values.

For example, if they can then choose, on thje first menu, to add 10 to the amount, and on the second, add 5.

Thanks for the help.

Oh, and could a moderator please move this post?
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Harvey is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Adding to values
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.46498 seconds with 12 queries