Bill Platt wrote:

> Now, I am beginning to think that I have
> misunderstood the nature of using cookies.
> I am actually attempting to do so for the
> first time.
> 
> When I fire the SetCookies procedure:
> &setCookie("user", "dbewley", $expDate, $path, $domain);
> 
> Is this the only way it can be done?

Pretty much.

> I thought perhaps I could create a cookie
> like this:
> &setCookie("name1", "value1", "name2", "value2", "name3", "value3",
> "name4", "value4");
> 
> But, this version is not working correctly.

The setCookie routine is looking for a specific set of arguments.
You must supply those args in the correct number and order.

> Can I do it this way:
> 
> &setCookie("name1", "value1", "name2", "value2", "name3", "value3",
> "name4", "value4", $expDate, $path, $domain);
> 
> Or, am I to gather that if I want to set up four values
> into cookies for my site, that I will need to set up
> four cookies? Or, am I simply doing something else
> wrong?

You can do multiple cookies or you can concatenate the values into
a single string and use just one cookie.

eg: setCoookie ('name1|value1|name2|value2|name3|value3|name4|value4', 
$expDate, $path, $domain);

_______________________________________________
Perl-Unix-Users mailing list
Perl-Unix-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to