Submit your breaking news stories and original articles to us by contacting us
Before I get started, though, let me answer the obvious question: Since most forms are perfectly happy with a single submit button, why would anyone ever need two (or more)?
The best way to explain such a need is with an actual example from the last project I worked on. In that project, I was tasked with building an inventory system for a book-lending library. The book titles were all stored in a database, and administrators could use a browser-based interface to view the record for any book and then perform one of four actions on that record: check out to a member, check in from a member, mark as missing, and mark as sold.
Hmmm, I never came across a time where I needed more than one submit, but I guess those times do exist.
Category: Uncategorized
3 Responses for "Multiple Submits With PHP"
July 1st, 2004 at 7:04 pm
1Well, I’ve had to… here’s a screenshot.
Web-based payroll system. fun fun fun.
July 1st, 2004 at 10:14 pm
2I just did such a thing today in fact — because, as the case usually is, I needed to do different processing of the data based on which submit button was pressed.
August 30th, 2004 at 2:04 pm
3Yeah, I do this all the time in web applications I’ve worked on. Different buttons for New, Submit, Delete, Paging, etc.
I’m afraid I was doing it in a rather inaccessible manner before, though, by using javascript buttons to set different actions on the form. But on my latest app, I’m using the button names to figure out which was pressed.
RSS feed for comments on this post
Leave a reply