Jump to content

Cookies


BigGrecian

Recommended Posts

Dump the $_COOKIE variable using var_dump so you can see for sure what it contains:

var_dump($_COOKIE);

 

I'm not too familiar with ASP but it appears as if you're trying to store an array of different cookies under one overall cookie name.  You may need to write a function to convert whatever format ASP uses to store the cookies into a compatible PHP structure.

Link to comment
https://forums.phpfreaks.com/topic/273597-cookies/#findComment-1408064
Share on other sites

array(2) { ["ENROLLER"]=> string(205) "ADMIN=3&SCHOOL=0&STUDENTID=119&ATSCHOOL=1&EXAMINER=1&INSTRUCTORID=35&INSTRUCTOR=1&SSIRNAME=Doe&SNAME=John&DURATION=30 Mins&[email protected]&CUSTOMERID=0&CAATESTFEE=1&VISASENT=1&TSAR=1" ["ASPSESSIONIDACBQQTAC"]=> string(24) "DCBLNLMAIJGJPIPJAHLHAJID" }

 

In ASP you can pull the sub COOKIE such as ENROLLER and SSIRNAME or ENROLLER and SNAME.

Link to comment
https://forums.phpfreaks.com/topic/273597-cookies/#findComment-1408087
Share on other sites

Based on the var_dump, you should be able to just use parse_str to parse the cookie into is sub-cookies.  The result can be either stored into a different variable or back into $_COOKIE['ENROLLER'].

 

parse_str($_COOKIE['ENROLLER'], $_COOKIE['ENROLLER']);

 

Link to comment
https://forums.phpfreaks.com/topic/273597-cookies/#findComment-1408088
Share on other sites

Archived

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.