the working scenario on a web bases app like a forum, the users can add or edit their replays. The strategy that I’ve used until now was to use different form actions: one for insert and one for update.
Is this the right approach or I can use something else, which is more easy to maintain?
many thanks!
Personally, I use an ‘edit’ variable with a single form. I set the edit variable to true when editing a form, false for creating a new form. I send this variable (in a hidden element in the form) off to the page that processes the data and that function determines whether to INSERT or UPDATE into the database.