suggestions wanted concerning form handling "template"
- From: "DJ Majestik" <jimmymg@xxxxxxxxx>
- Date: 14 Jun 2005 07:02:01 -0700
OK, I am devising a php page that will handle a form submission, and
wanted to know if anyone has already setup such an idea, or if you had
links to point to good tutorials on this.
Basically I have a form (which I use smarty templating to display, and
smartyvalidator to validate).
The php page basically is driven by the action variable (add,
add_confirm, edit, edit_confirm, view, delete). When the form starts
out, it is in view mode. Then if you click the add button, it switches
to add mode. Confirming a new addition sends you into add_confirm
(which would write to a DB, etc.). Edit would work the same way, except
edit mode would lookup a record to display, edit_confirm would update
that record, delete mode would delete, and view mode would basically
display data (to edit/add/delete).
Sounds easy, but my code is pretty long and I am looking to simplify
this idea. Looking for how you all do this, and if anyone has a
"template" setup to do this.
Mine would be something like:
if ($action == "view") {
// do something
..... etc ....
Ideas? Let me know. Thanks,
Jim
.
- Follow-Ups:
- Re: suggestions wanted concerning form handling "template"
- From: Kenneth Downs
- Re: suggestions wanted concerning form handling "template"
- Prev by Date: Re: Are They Lying: $_SERVER["HTTP_REFERER"] Question
- Next by Date: Re: how to pass form imput as variable to mysql?
- Previous by thread: PHP mass emailing and handling bounces
- Next by thread: Re: suggestions wanted concerning form handling "template"
- Index(es):