Results 1 to 4 of 4

Thread: checkbox value

  1. #1
    Join Date
    Oct 2009
    Posts
    37
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default checkbox value

    Hi,
    how can i get the value from the database and it will calculate the total when i selecting check box's. can any one help me. i need the db table structure and the php code. can anyone help me please??

    Thank you

  2. #2
    Join Date
    Sep 2007
    Location
    Maui
    Posts
    642
    Thanks
    284
    Thanked 15 Times in 15 Posts

    Default

    I think you need to be a bit more explicit. Do you mean the total number of check boxes or the total of the values taken from the database? What exactly are you trying to do? People can't help you if they have nothing to go on.

  3. #3
    Join Date
    Oct 2009
    Posts
    37
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default

    Please check the link www.getreal.com.kw/cart .
    This is a simple Html, javascript function to calculate the total value of the item price by selecting the check box's
    so far its good,but i need the grand total as i mentioned black tabs in the bottom. i was trying to find out the script for getting the grand total, but i couldn't get. now i am trying to do this with Php. I hope u know what i am trying to say.

    Thank you

  4. #4
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    if you're going to do it with php, you have to send the information to the server first. Your forms don't have any action right now. Then, you could take the values of all the checked items, add them up, and return the total.

    However, if you want the grand total to appear on the page as the user clicks, like your individual totals do now, then you need to use javascript. PHP only works on the server, and can't do anything after the webpage has been sent to the user.

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
  •