Jump to content

PHP Addition On Mail Form


cedartree

Recommended Posts

hi there.

i have a form in which someone fills in their expense information,

and when they submit the information, it gets e-mailed.

i would like to use the $addition feature in order to total out the information so that I don't have to manually calculate them every time.

I would also like to subtract the difference between Income information VS Expense information.

This is what I have (everything works except for the math part, so i will leave out the unnecessary code):

$total_contents .=  "Groceries/Supplies         : " . $_POST['GroceriesSupplies'] . "\n\n";
$total_contents .=  "Day Care        : " . $_POST['DayCare'] . "\n\n";
$total_contents .=  "Medical         : " . $_POST['Medical'] . "\n\n";
$total_contents .=  "TOTAL EXPENSES: " . $_POST [$addition = 'GroceriesSupplies + DayCare + Medical'] . "\n\n";

 

if you would like i can also e-mail you the php file. Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/135545-php-addition-on-mail-form/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.