Hi
I have 2 pages to help deal with contacts and events.
CONTACT HUB PAGE -
Shows customer info nicely and also a dynamic table of events associated with that customer. The event table has a link at the end to modify that event. It uses a hidden form field that has that specific id...or it should... (SEE BELOW)
EVENT MANAGER PAGE -
This is where you can add an event.
It has an if statement - if it detects an filled post variable ( != '') it queries the database for that event id, fills in the associated form fields for modification, and allows the user to update the field.
If the variable is empty, it shows a form to add a new event with some default values.
To debug I have the form echo the event id it was sent.
Under this form is always an included php file that lists the events with that contact. It is the same file as on the Hub page.
THE PROBLEM:
The form does not update - meaning if a user were to press add event, and then change their mind to modify an event instead by selecting "modify" from the dynamic table, it will not change!
Also, I have seen that the "event id" that is captured for each contact is the same (although in the db it is not), meaning that whether I press the third row modify link or the 1st row modify link the echo is the same - meaning all the rows are given the same event id, though in my table the form is under the while statement per record, so this is a little unclear to me how this happened.
Any help/direction would be appreciated, thanks.
I have 2 pages to help deal with contacts and events.
CONTACT HUB PAGE -
Shows customer info nicely and also a dynamic table of events associated with that customer. The event table has a link at the end to modify that event. It uses a hidden form field that has that specific id...or it should... (SEE BELOW)
EVENT MANAGER PAGE -
This is where you can add an event.
It has an if statement - if it detects an filled post variable ( != '') it queries the database for that event id, fills in the associated form fields for modification, and allows the user to update the field.
If the variable is empty, it shows a form to add a new event with some default values.
To debug I have the form echo the event id it was sent.
Under this form is always an included php file that lists the events with that contact. It is the same file as on the Hub page.
THE PROBLEM:
The form does not update - meaning if a user were to press add event, and then change their mind to modify an event instead by selecting "modify" from the dynamic table, it will not change!
Also, I have seen that the "event id" that is captured for each contact is the same (although in the db it is not), meaning that whether I press the third row modify link or the 1st row modify link the echo is the same - meaning all the rows are given the same event id, though in my table the form is under the while statement per record, so this is a little unclear to me how this happened.
Any help/direction would be appreciated, thanks.