View Full Version : cookies

12-20-2010, 08:59 PM
Does anyone know how to have a cookie remember the previous page the viewer was viewing (url), so I can redirect them back there?

12-20-2010, 11:12 PM
You could just use:

header("Location: ".$_SERVER['HTTP_REFERER'])
Then there is no need for a cookie.

Or if you need one, you can use:

setcookie("RefererCookie", $_SERVER['HTTP_REFERER']);
echo $_COOKIE["RefererCookie"];

12-21-2010, 08:50 AM
thanks Jmace!
I think it may help!

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum