Jump to content

Setting a cookie across www.mysite.com and mysite.com


Recommended Posts

Hi, probably a simple solution to this which I am overlooking, doing my first foray into using cookies.

So far all is well, but how do I make a cookie valid for both www.mysite.com and mysite.com


if(isset($_POST['remember'][1])) {
    $session_id = md5($_SESSION['username'] . $_SESSION['last_login']);
    setcookie("session_id", $session_id, time()+60*60*24*30, "/");



Thanks, TS  :P

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.