|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
what is the best technique
when creating and parsing forms. I have looked at quite a few books with different authors and each of them have a different approach to getting something done. So As i am learning this stuff it has become a little frustrating because each person has a different style.
So maybe this question is for someone with some expierance. A form goes through the same couple of steps every time. one way to do it s to write a form at the first step as simple html and when you submit it could be held in hidden fields and sent to an output.php then to a confirm.php. you can also make the form start out as a form.php then parse directly to a "this data was inserted into the database" page. I guess my question is if I am going to have a login page that goes into an admistration page and then customer service people will have the ability to add customers , delete customers or edit customers should i display the form first through a php page to a php page or go html - output.php then finally to a confirm.php? I guess these are preferences in the way you can strategize on how to run through your basic forms . Anyway, its an interesting discussion and if anyone that can understand what the heck i am talking about above could maybe shed some direction form would be appreciated. |
|
#2
|
||||
|
||||
|
RE: what is the best technique
This is to me a matter of personal style and the requirements of security needed. Generally speaking I do most of my form handling on the same page as the form (unless I am using templates). I like having everything in one place (tend not to like to include things)- though that goes against the OOP model.
The only time I usually deviate from this is when I need a higher layer of security. This allows me tighter control of access to my db and a little more flexibility. |
|
#3
|
|||
|
|||
|
RE: what is the best technique
After working on a very large project which has taken better than a year, my preferred method is to have pages refer to themselves, keep the formatting/database connection/GUI/session calls in a header file, and include function repositories for page-specific functions.
I tend to have a form call its own page, and parse the get/post variables whenever the page is called to determine what it should be doing. |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Programming Theory > what is the best technique |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|