Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-15-2012, 01:36 PM   PM User | #1
syedyasin86
New to the CF scene

 
Join Date: Nov 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
syedyasin86 is an unknown quantity at this point
Post php code to check muliple conditions

Hello All,

I am new to php, i have been learning PHP for while. For my site i need a php code to check multiple conditions to populate the result

HTML form code

a = optionA, optionB, optionC, optionD
b = 5
c = 3

Here i need to check "a" is optionA or optionB, optionC or option D
condition A
if variable a = optionA
then the code should assign optionA = 6
and d = 6*5*3

condition B
if variable b = optionB
then the code should assign optionB = 9
and d = 9*5*3

condition C
if variable c = optionB
then the code should assign optionC = 11
and d = 11*5*3

condition D
if variable a = optionD
then the code should assign optionD = 15
and d = 15*5*3

Guys help me to find the code

Thanks in advance
syedyasin86 is offline   Reply With Quote
Old 11-15-2012, 02:31 PM   PM User | #2
mlseim
Master Coder

 
mlseim's Avatar
 
Join Date: Jun 2003
Location: Cottage Grove, Minnesota
Posts: 9,056
Thanks: 8
Thanked 1,032 Times in 1,023 Posts
mlseim has a spectacular aura aboutmlseim has a spectacular aura aboutmlseim has a spectacular aura about
Show the form where they pick the options.
That will give us the info we need to answer this.

We need to see if you're using radio buttons, checkboxes, etc.
and we need to see how you're defining the form variable names.


.
mlseim is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 12:47 PM.


Advertisement
Log in to turn off these ads.