Hello,
I am working on a piece of code which currently does the following;
- a csv file is opened, its contents are exploded and placed into a table (using PHP)
- i have added a checkbox to the options which when checked need to send the cost of the selection to the total cost field
-- i am trying to use javascript to calculate the total cost and I think I need to use $HTTP_POST_VARS
The rouble is I don't know how and where to use $HTTP_POST VARS.
Here is a small segment of my code, any ideas where I can put $_HTTP_POST_VARS so my javascript function will work???
for ( $loop=0; $loop<count($my_array); $loop++ )
{
$i = 0;
$element = $string;
$code = my_array($element[0]);
$title = my_array($element[1]);
$cost = my_array($element[2]);
$total = 0.00;
echo "<tr>
<td><input type=\"checkbox\"name=\"selection[]\"onclick=\"calc_cost()\">$title[$i]</td>
<td>$code[$i]</td>
<td>\$$cost[$i]</td>
</tr>";
}
}
echo"<tr><td colspan=\"2\"><b>Total</b></td>
<td colspan=\"2\"><b>$</b><input name=\"COST\" type=\"text\" readonly=\"readonly\" value=\"$total\"></td></tr>";
fclose($fh);
?>
Any ideas????????????????????????????
thanks in advance
kattz
😕