Jump to content

Add session variable from repeat fields


billhobbs

Recommended Posts

I have a page that repeats a table from my database. I add to fields from the table together to get a combined value with a a session name $charge . This table is repeated based on a common id. I need to add the $charge from each displayed fields to create another session variable called $totalcharges . How do I do this?

Link to comment
https://forums.phpfreaks.com/topic/263522-add-session-variable-from-repeat-fields/
Share on other sites

Here is a pic of what I'm trying to do.

$charge = $200.00  -- this is created by multiplying 2 other variables together

$charge = $500.00  -- this is created by multiplying 2 other variables together

 

Total charge should be $700.00

 

I can't use sum($charge) like I would normally do when I add fields from the database.

 

How do I add the 2 $charge values together?

post-102255-13482403558732_thumb.png

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.