[PHP] Help with session needed

2003-03-09 Thread Øystein Håland
Today I collect information from several forms and store it in a cookie:

function formCookie() {
 var cookieValue = document.$formName.totalAns.value+'|';
 cookieValue
+=document.form1.correct.value+'$test[1]'+document.form1.question1.value+doc
ument.form1.answer.value+'|';
 cookieValue
+=document.form2.correct.value+'$test[1]'+document.form2.question2.value+doc
ument.form2.answer.value+'|';

more lines

 document.cookie = '$ansCookie='+escape(cookieValue)+';expires=';
}

The problem is the cookie soon reaches the 4 kb limit, so I would like to
achieve the same using session. The trouble is, I don't know how to do. I
would appreciate any help that brings me closer to a solution on this.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Help with session needed

2003-03-09 Thread Jack
On Sun, 9 Mar 2003 21:18:33 +0100
Øystein Håland [EMAIL PROTECTED] wrote:

 The problem is the cookie soon reaches the 4 kb limit, so I would like to
 achieve the same using session. The trouble is, I don't know how to do. I
 would appreciate any help that brings me closer to a solution on this.

have a look in the manual:

http://www.php.net/manual/en/ref.session.php

in the middle of that page are some examples, which may help you.

bye

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Help with session needed

2003-02-21 Thread Øystein Håland
I use cookies in my web applications, but have reached the 4 kB limit. So I
need to 'convert' all my cookies to session variables. Have got an idea how
I can create such for one variable, but here I have multi element cookies.
Reading the php manual gives me no idea on how to do this.
Here's the recipe for my cookies:
function formCookie() {
 var cookieValue = document.$formname.totalAns.value+'|'; // Using '|' to
split each part of the cookie
 cookieValue +=
document.form1.correct.value+'$test[1]'+document.form1.question1.value+docum
ent.form1.answer.value+'|';
 cookieValue +=
document.form2.correct.value+'$test[1]'+document.form2.question2.value+docum
ent.form2.answer.value+'|';

more lines

 document.cookie = '$answercookie='+escape(cookieValue)+';expires=';
}

How can I achieve the same using sessions



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php