Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Sep 2012
    Posts
    12
    Thanks
    2
    Thanked 0 Times in 0 Posts

    HTML data to Javascript to MySQL

    I apologize if this is in the wrong forum but since a majority of what I'm doing with this will be in javascript I figured I'd post here. Anyway, I am trying to pass form data, textboxes and checkboxes into javascript to do a complex math function from data on an HTML form that then posts that data via PHP to MySQL. I have no PHP script in the form but I need to pass the content of all numerical textboxes to the javascript to do the formula as well as taking into consideration 15 checkboxes being checked or not. What is the best way to do this?

    Thanks in advance

  • #2
    Senior Coder xelawho's Avatar
    Join Date
    Nov 2010
    Posts
    3,020
    Thanks
    56
    Thanked 566 Times in 563 Posts
    give all the relevant form elements id's (or you can use their names, being that the form is going to be submitted)
    check if the checkboxes are checked, and do whatever you are going to do with that information
    collect the values of the form fields into variables, do your calculation.

    it's a little scant on detail, I know, but you're not giving us much to work with...


  •  

    Posting Permissions

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