Easiest way to give Javascript alert after PHP header() redirect

nobody92

New Member
I have a page where users submit a form, and it goes to a separate PHP script. After the script is done, it header() redirects the user back to the page they were on. Now what I want to do is if there is an error or certain conditions in the script, redirect the user to the same page but display a Javascript alert once they get there as a warning message. I could append some variables to the URL and check for that with $_GET but I figure there is probably an easier way... perhaps with some POST data, or something like that?Thanks
 
Back
Top