Jump to content

Recommended Posts

Hi Gurus,

 

I am currently involved with a large php project that requires many php forms.

My approach to POSTing data is to create ONE separate script that can be called by ALL the pages

for back end data processing. An alternative approach of course is to create one back end processing script

fpr each form but this can lead to coad bloat.

 

It has recently been suggested to me that I might like to include the back end processing as part of the form script ...

 

I am curious to know how other php developers do this ...

 

* separate script per form,

* backend processing within form script OR

* one processing script that deals with multiple form POST resquests (as in my case)

 

I would like to hear some opinions on this ...

 

regards,

 

Steven M

Link to comment
https://forums.phpfreaks.com/topic/96509-submitting-forms/
Share on other sites

I have a single file for each form I have but all the forms go to index2.php and it calls the correct file to process the data that is being sent to it. This is done before loading the form page. I just make a call to:

systemManager::formProccessSet("path to form file");

And when index2.php is loaded it gets the file, it processes the data and then I just do a header("location to either the last page or to a previous set page (also done in the formproccessSet method)

Link to comment
https://forums.phpfreaks.com/topic/96509-submitting-forms/#findComment-498118
Share on other sites

one processing script that deals with multiple form POST resquests

 

I've got one processing class and separate "package" for each form. Package contains form skeleton, validation rules (required fields etc.), sql for dynamic data, action URL ... (still in development).

Link to comment
https://forums.phpfreaks.com/topic/96509-submitting-forms/#findComment-498733
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.