How to create a multiple forms in one submit button to insert in the database?..

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vyon13
    New Member
    • Feb 2008
    • 8

    How to create a multiple forms in one submit button to insert in the database?..

    hello... i have a problem regarding to my proj that i was working...
    this is the prob.. in my application form there are so many categories to be fill up... i realize that if i will put all the categories in one form the user will scroll it down untill he/she fills up all the information...
    the alternative solution is i have to cut the form category by category... to avaoid scrolling.. the problem is i dont know how to create a code to handle the data in all the categories before the user will click submit button and all the info typed by user will save on the database... anyone can help me?.. thanks in advace...
  • rpnew
    New Member
    • Aug 2007
    • 189

    #2
    Originally posted by vyon13
    hello... i have a problem regarding to my proj that i was working...
    this is the prob.. in my application form there are so many categories to be fill up... i realize that if i will put all the categories in one form the user will scroll it down untill he/she fills up all the information...
    the alternative solution is i have to cut the form category by category... to avaoid scrolling.. the problem is i dont know how to create a code to handle the data in all the categories before the user will click submit button and all the info typed by user will save on the database... anyone can help me?.. thanks in advace...
    Hi,
    If you want to submit more than one form on one button click.... then i suppose you need to make simple button and then on its onclick event you can call a function that submits all the form like following...... .
    [CODE=javascript]
    function form_submit()
    {
    document.form1. submit();
    document.form2. submit();
    ......
    }
    [/CODE]
    You can call this function on buttons onclick event..........

    Regards,
    RP

    Comment

    • vyon13
      New Member
      • Feb 2008
      • 8

      #3
      Originally posted by rpnew
      Hi,
      If you want to submit more than one form on one button click.... then i suppose you need to make simple button and then on its onclick event you can call a function that submits all the form like following...... .
      [CODE=javascript]
      function form_submit()
      {
      document.form1. submit();
      document.form2. submit();
      ......
      }
      [/CODE]
      You can call this function on buttons onclick event..........

      Regards,
      RP




      thanks RP,.. but iam not familiar in javascript.. cn i use php?.. if u have example, if u dont mind kindly share it with me... or email it, heres my add zcherhub_vyon13 @yahoo.com
      thanks in advance!!.,,

      Comment

      • rpnew
        New Member
        • Aug 2007
        • 189

        #4
        Originally posted by vyon13
        thanks RP,.. but iam not familiar in javascript.. cn i use php?.. if u have example, if u dont mind kindly share it with me... or email it, heres my add zcherhub_vyon13 @yahoo.com
        thanks in advance!!.,,
        Hi,
        Ok now if you are making all the forms on one page then Javascript is better and if you are dividing them into different pages then you can do that with PHP but in that case you need to keep track of the values submitted on the previous.. and in this case you have to submit forms on everypages to get its components value...... i hope you get what i meant to say....... anyway.. post back with your case and if possible with a bit more explaination how do you want to do it? so that i can provide you help with code...

        Regards,
        RP

        Comment

        Working...