Is it possible to send an array with a header('Location:); so the array can be echo’d after redirect? I have a signup form and on error it redirects to the homepage, on success it redirects to the member page. if I can do something like $arr['error_message'] = 'Invalid Password'; then on the redirect if (isset($arr['error_message'])) { echo $arr['error_message']; }
This is to hopefully achieve not needing an extra URL parameter (&error=Invalid%20Login). I noticed $_SESSION is an option but what if the user has multiple tabs open? Or am I stuck with using more URL params?
You can use $_GET to do that, like
And retrive in you current page like