SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    May 2011
    Posts
    191
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Getting total in a table

    Hi all!

    I have a .php webpage with a table with a list of elements, one per row.
    Each of these elements has a price, also showed in the table.
    Each line of the table, it is, one element with one price can be selected or not with a checkbox in every row.
    I want to have a total price of all elements selected.

    Could you please tell me how to do this?

    Thanks a lot!!!

  2. #2
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,401
    Mentioned
    147 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by Sir_Arcturua View Post
    I want to have a total price of all elements selected.
    Do you want the total to update automatically when the user selects/deselects an element? Then you'll have to use javascript.

    Do you want to show the total after the user has submitted the form? Then it's a normal form handling php script. If you google for php form tutorial you'll get thousands of results.

  3. #3
    SitePoint Zealot
    Join Date
    May 2011
    Posts
    191
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hi Guido!!!

    I will take a look as you suggests, thanks!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •