I usually use the same form in php for add and edit. If the form is for add i leave the fields empty and change the button text to add. If the page if for edit i populate it with appropriate values from the database and change button text to update. There may be some other minor tweaks too. However I have been reading around and saw this
"It's generally quite easy to use the same form. Another question is how you solve validation errors and not making the user re-fill the form - this gets solved as in the same process. You'll need some helpers for the select fields and any checkbox/radio fields. Exactly how much the helpers do is up to you, but these will get you started:"
I dont know what this means. Why do i need helped? If the user changed a select or radio button on an edit then the form validation would pick it up wouldnt it if there was a problem
If there is a simple design pattern for using the same form for adds/updates I would be grateful if you could point me to it