Skip to content
Advertisement

PHP; how do I sum a variable after $POST with issest [closed]

I have a massive file with a few variable I would like to sum(add) after they are POST.

I should note that I am doing this in TCPDF. I don’t know if it makes a difference. Nonetheless, The variables I am trying to sum are being posted via an isset function. After the variables are posted, I declared a new variable. Example $sum = $two+$three+$four+$five;. However, when I do this I get an undefined variable error. Ideally, I would like declare a new variable that takes the summed values and placed them in a HTML string in my TCPDF file. for example

Total: $sum

JavaScript

Advertisement

Answer

Maybe try one at at time. Its tedious but i think it might work.

JavaScript

`

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement