I am trying to use the list function to call a calculation using $_SESSION[''] in a node

I have put in this code

<p>
miles: <?php print $_SESSION['a2']; ?>
</p>

<?php
If (print $_Session['a5'] = $_form_value['one'])
$b1 = "10";
if (print $_Session['a5'] = $_form_value['two']) 
$b1 = "20";
?>
<p>

Total <?php print $_SESSION['a2']*$b1; ?> Lbs

I get the math correct for one of the values (in this case it's the $b1 = "20"; value

I want to be able to choose a value based on the drop down list selection.
any suggestions as to how I might accomplish this?

Comments

leavellwd’s picture

Well can anyone point me in the right direction?

leavellwd’s picture

please

leavellwd’s picture

Ok I figured it out. Thanks for your help everyone I appreciate it.

Seriously if anyone needs help with anything feel free to contact me, I'll do what I can to help and won't ignore your requests like most people do.

quicksketch’s picture

Status: Active » Closed (fixed)

Support for writing custom code is not provided in the Webform queue.