php - How to process mutiple forms using one page with functions? -


so can include example functions.php in file , can use different functions in page validate user input.

but how can process multiple forms using same file?

example:

include formprocessor.php 

formprocessor contain functions related each form:

form action=formafunction() form b action=formbfunction() form c action=formcfunction() 

can formprocessor.php contain function handling each form? each form have own function process data.

if possible way more convenient having processor file each form on site. 10 forms 10 processing files?

or 10 forms 1 processing file.

you can see input type=hidden contains name each form, in form processor, read name submitted , go specific part of code accordingly.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -