Convert my old cookies to session variable(s)
| From: | �ystein H�land | Date: | Mon, 17 Feb 2003 02:06:57 +0000 |
| Subject: | Convert my old cookies to session variable(s) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-135790@lists.php.net to get a copy of this message | ||
I use extensively cookies in my web applications, but have reached the 4 kB
limit. So now 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.form01.correct.value+'$test[1]'+document.form01.question1.value+doc
ument.form01.answer.value+'|';
cookieValue +=
document.form02.correct.value+'$test[1]'+document.form02.question2.value+doc
ument.form02.answer.value+'|';
<more lines>
document.cookie = '$answercookie='+escape(cookieValue)+';expires=';
}