Confirmation message on same page
Posted on 2007-12-06
I've been wondering how I can display confirmation or error messages inside the same page, kind of like what the admin area of wordpress does.
For example if a user updates a database table through a form field and it's a success then the user would be returned back to the original page (using the php header function) with the confirmation echoed inside a <div> tag or something similar.
Or how about when a user tries to log in and enters the wrong username or password. How would I then display a message like "Sorry, try again" on the same page as the form?
Anyone got any ideas how to do this? it would help me a lot for my project!