Hi,
Im looking for code, or an extension, that will allow me to present the user with a link, which slides down a form from the top or side of the screen, or even in an model/lightbox which allows them to enter the following values
-
pv_value
-
mr_value
-
age
It then needs to query separate table called "matrix" in the same database to find three all 3 values in the row e.g. "r1c1","r1c2", "r1c3" where $Age=rowAge1
col1, col2, col3
rowAge1: r1c1, r1c2, r1c3
rowAge2: r2c1, r2c2, r2c3
rowAge3: r3c1, r3c2, r3c3
THEN, armed with these 3 values from the database, it needs to do a few calculations and present the results
e.g. one calcualation would be:
$pv_value = $_POST['pv_value'];
$age = $_POST['age'];
$rev_percentage = /* SELECT col1 FROM Matrix WHERE $age=age */
$rev_value = 1000 * (($pv_value * $rev_percentage) / 100);
if ($rev_value < 0) { $rev_value = 0; }
$rev_value = number_format($rev_value);
return $rev_value;
So we’d then echo $rev_value;
Same for another two calculations…
The form should do it all in the frontend, and there’s no need to save the results… just output to screen…
Any incredibly charitable and very bored devs out there?
p
p.s. i meant Calculations and Custom, not Calcutaions and Custum, and i cant edit that title lol FML!