the function I am interested in is the use of the radial buttons and the way it tallies the price
Well for starters, with PHP forms like this you always have to do the HTML end of things first:
anypage.htm
Code:
<form action="submit.php" method="post">
Value 1:
<input type="checkbox" name="checkbox1" value="15">
<br>Value 2:
<input type="checkbox" name="checkbox2" value="45">
<br><input type="submit">
</form>
submit.php - processes the information
PHP Code:
<?php
$field1 = $_POST["checkbox1"];
$field2 = $_POST["checkbox2"];
$output = $field1 + $field2;
echo $output;
?>
Let's break down the above script:
first line: "$" always starts before defining a variable, which in this case it's contents is checkbox1's value.
Line two is the same except your defining the second checkbox.
Line four processes the information, adding $field1 and $field2.
Line five is a simple statement "echo" which writes the variable $output.
The outcome should be "60"
That should point you in some direction.
Bookmarks