How do I return to the page I was at previously?
header("Location: WHAT GOES HERE);
I know that putting simply a URL in there will work, but I want it redirected back to where the form was sent from.
Thanks -KLiK
Hi klik,
You could add a hidden field to the form, called 'referrer' say, that has the URL of the current page and use $POST['referrer'] or $GET['referrer'] in the call to header().
Paul.
Hey klik, just thought of another way,
Store the URL of the page that contains the form in a session variable. Refer to it in the call to header().
P.
Cheers mate. Got it working just as I wanted to now 🙂