Happy Saturday ! This morning I finished up a page on the website I’m creating that allows an administrator to change a user’s settings and access on the website. I created the page to load the user’s current settings from the SQL database and display them. Once the changes are saved, those changes are then updated in the database.
To properly update the site’s event log, I used multiple Session statements and a nested if/else statement to check if the “changes” being saved are the exact same as the data already in the database. If so, a message is displayed to the user that no changes have been made and the site’s event log is not updated. Otherwise, i update the site log stating that a change has been made to the user’s access and also state who made the change (by displaying their login name).
Originally, i tried to do this using a SQLDataReader() but it wasn’t working because i guess when saved, it updated the database with the new data before the reader could read/compare the old data. But, after deciding to sleep on it and try again another time, the idea to try Session statements dawned on me this morning and it worked like a charm!
If anyone has other techniques that you think i should try on my website or any other comments please feel free to share with me.
Next up, working on the Reset/Forgot Password pages !