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
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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.