Forum Moderators: coopster
I have a site with a "events" page (a list of events, date, event name and event description) I have a form with 3 fields (date, name and description)...
I need to do 4 things...
insert records (not a problem)
display records (not a problem)
update records (can't figure how to update, need id)
Any Help?
To update is similar to displaying records. Get the data from the database, but display the information in a form (echo the data in the appropriate form field like a text box, radio button etc.). Then have an update button that posts the edited variables for that record to your update MySQL query.
You should have an 'eventID' field in your database, and track that through the form with a hidden field if you don't want to display it.