MySQLi Update Record not working as POST
Hello,
I built a form on a page (a1.php) that has a repeat table that lists each distinct user from the database. The form will post to a second page (a2.php), listing the record in a form for record updating. On the second page, I have a form that lists the user record fields, pre-populated that can be changed - some of the fields are read-only.
The Page 1 works well and lists the various users. On submit it loads the Page 2 well and lists the user (that was selected from Page 1) well, with fields pre-populated and ready for modifications.
When I click to "Update record" it does not save any of the changes, nor return me to the referring page. It stays on the Page 2, and shows blank input fields.
In the WebAssist Update Record settings, I set the trigger to "Current page submit". I tried the "any form post", but then the Page 2 would never show at all...
I am sure that this is probably a simple error I am making somewhere, but I cannot figure out how to correct it. I have attached the code from the two files for your review.
As a side note: I had created a page in the past that used URL parameters instead of a form post from page 1. Page 2 would GET the results and all worked fine. The problem is that I cannot allow users to see the URL parameters and thus created the POST form on page 1 to invisibly pass the variable to page 2.
For example, in the Page 1 table, I included a cell that passed the URL parameter:
<td><a href="ent_int_archive_user_edit_detail.php?recordID=<?php echo ($Recordset1->getColumnVal("UserID")); ?>"> EDIT</a></td>
Then in Page 2, I used the WebAssist Update Record setting with "any form post" and all worked well.
For some reason, Page 2 does not update records after I submit the Page 2 form (after I changed the method from GET to POST).
Could you please help me to correct this problem?
Thank you very much for your help and advice.