Jump to content

Processing Multiple Forms with Ajax Using One Page of PHP


ridgey28

Recommended Posts

Hi

 

I have put together a options page for the script that I have been working on.  I have 1 options page where there options are divided into 4 jQuery tabs with there own save button.  The options in each tab are posted using Ajax to their own separate file like process.php, process1.php etc. 

My question is there a way to place all the processing code in one file and if so would this affect the load on the server?  Would each form be better off having their own page for processing? 

 

For example:

<form id="options_1" action="process1.php" method="post" >

          <!-- this is form 1 that is processed with process1.php -->

</form>

<form id="options_2" action="process2.php" method="post" >

          <!-- this is form 2 Can this form be processed using process1.php instead of process2.php -->

</form>

<form id="options_3" action="process3.php" method="post" >

          <!-- this is form 3 Can this form be processed using process1.php instead of process3.php -->

</form>

 

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.