Re: HTML Forms, PHP Question
| From: | Bill Guion | Date: | Mon, 20 Nov 2006 15:17:06 +0000 |
| Subject: | Re: HTML Forms, PHP Question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-244880@lists.php.net to get a copy of this message | ||
At 11:00 AM -0500 11/19/06, Stephen wrote:
Hi First question to the list. I am writing a control panel for a web site and there will be about 20 HTML forms. Instead of creating 20 PHP files to process the submit data, is there a way that I can do this with a single PHP file. Either specify a specific function for each form, or use a case statement somehow to direct to the function. Thanks! StephenYou may find it more organized to have one file for each form. The file posts the form and processes the form when it is submitted. The advantage to this is that if you modify the form, both the form and the processing are in the same file and you only have to modify one file. Others clearly like to have each form in a separate file and all form processing in one file. Choose the method you like. The archives here will show you how to both post the form and process it in one file.
-----===== Bill =====-----
--
There is so much good in the worst of us,
and so much bad in the best of us,
that it ill becomes any of us
to find fault with the rest of us.