Thanks to all posters for their input.

For what it's worth, I'm writing a PHP application for a very specific purpose of running my office billing etc so I have total control over the JavaScript settings for users. The entire application would break without JS so if they turn JS off, all they get is a page telling them to turn it back on.

I know I could direct all form submissions to one handler, and easily figure out which button was actually used to submit the form and use a SWITCH, but I like the idea of having the code in smaller segments. It makes it easier for me to find what I'm looking for. Just a personal preference.

I actually found some nice JS to change the form action dynamically using by using the button to set the value of the variable "handler" to "edit.php" or "delete.php" etc etc

document.myform.action = handler;

Thanks again.

----- Original Message ----- From: "Matthew McKay" <>
To: <>
Sent: Tuesday, June 02, 2009 5:32 AM
Subject: Re: [PHP] Directing form to different handlers?

It would be much simpler and cleaner to use Javascript to modify the form's
action attribute onClick.

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to