<?xml version="1.0" encoding="UTF-8"?>
<post>
  <body>Hello again,

I have managed to get the sessionid for the cookie I have 1 thing to sort and im all done : )

I have to add 1 day to the cookie so it doesn't expire after it is created?

I have tried var date = DateAdd('d',1,Now()) but it didn't work?

&lt;pre&gt;
//Current date and time
var date = date now()

// finds the start of the session code
var offset = document.cookie.indexOf(&quot;=&quot;)+1

//length of cookie
var end = document.cookie.length

//build sessionid
var sessionid = document.cookie.substring(offset, end)

//new cookie
var cookie = document.cookie =
  'PHPSESSID='+sessionid+'; expires='+date+'; path=/'

// show me the cookie mmmmm.... cookie
alert(cookie);
&lt;/pre&gt;</body>
  <body-html>&lt;p&gt;Hello again,&lt;/p&gt;

&lt;p&gt;I have managed to get the sessionid for the cookie I have 1 thing to sort and im all done : )&lt;/p&gt;

&lt;p&gt;I have to add 1 day to the cookie so it doesn't expire after it is created?&lt;/p&gt;

&lt;p&gt;I have tried var date = DateAdd('d',1,Now()) but it didn't work?&lt;/p&gt;

&lt;p&gt;&lt;pre&gt;
//Current date and time
var date = date now()

// finds the start of the session code
var offset = document.cookie.indexOf(&quot;=&quot;)+1

//length of cookie
var end = document.cookie.length

//build sessionid
var sessionid = document.cookie.substring(offset, end)

//new cookie
var cookie = document.cookie =
  'PHPSESSID='+sessionid+'; expires='+date+'; path=/'

// show me the cookie mmmmm.... cookie
alert(cookie);
&lt;/pre&gt;&lt;/p&gt;</body-html>
  <created-at type="datetime">2007-04-25T13:11:05Z</created-at>
  <forumable-id type="integer">1</forumable-id>
  <forumable-type>Forum</forumable-type>
  <id type="integer">1380</id>
  <topic-id type="integer">366</topic-id>
  <updated-at type="datetime">2007-06-22T08:05:59Z</updated-at>
  <user-agent nil="true"></user-agent>
  <user-id type="integer">22166</user-id>
</post>
