FreakusBzzz Posted January 13, 2019 Share Posted January 13, 2019 On one of my calculators : https://bizztools.net/2017/qccu/bizztools2015_budgetTest.php When you press on the envelope in the middle you can send a form to yourself. Currently it sends all the subtotals for each section .. Income, Personal, Debts etc and I wanted it to now send each individual value. I've added the code in the file that gets used to send the form to the person's email. Header section: for ($i = 0; $i <= 79; $i++) { $item_Annual[$i] = number_format($_REQUEST['itemAnnualDisplay[$i]']); } Body: (each line of the form has a different value for $item_Annual) from 1 to 79 <TD bgcolor="#EEEEEE" align="left" valign="middle" height="1"><Font style="font-family:Arial; font-size: 12px;"><font color="#000000"> '.$currencySymbol.$item_Annual[1].' </TD> I've also added the return code in the calculations php file. This section of code is just for the Income sub section for ($i = 0; $i <= 6; $i++) { $incomeSubtotal += $values[$i] * $periods[$i]; $itemAnnual[$i] = $values[$i] * $periods[$i]; $return['itemAnnualDisplay[$i]'] = $itemAnnual[$i]; } //New addtions are lines 3 and 4, the others were already there Now, I've done some process of elimination and when testing to see if $periods[$i] and values[$i] would show up on the form, the values were zero for each. So each $itemAnnual[$i]is calculated to be $0. You can see from the form screenshot, the subtotals are calculating, but the individual items are not. Could this have anything to do with the form on the calculator page? It's in bootstrap. Help please!! Quote Link to comment Share on other sites More sharing options...
FreakusBzzz Posted January 13, 2019 Author Share Posted January 13, 2019 Is it something to do with [$i] and return? Quote Link to comment Share on other sites More sharing options...
ajoo Posted January 13, 2019 Share Posted January 13, 2019 (edited) You are using $item_Annual at one place and $itemAnnual at another. Edited January 13, 2019 by ajoo Quote Link to comment Share on other sites More sharing options...
ajoo Posted January 13, 2019 Share Posted January 13, 2019 Sorry, My suggestion is incorrect. I did not take a closer look. Kindly discard the previous reply. Quote Link to comment Share on other sites More sharing options...
ginerjm Posted January 13, 2019 Share Posted January 13, 2019 Some pretty ancient html code in use here. Perhaps a cleanup is in order. Font tag? Really? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.