PHP cookie with same name but different paths -
i want check cookie name "subscription" , there 3 cookies name has different paths follows path 1 / path 2 /customer/checkout/ path 3 /customer/register/
now if want apply if condition if subscription set condition works path 1.how make work 3 paths???
i don't think can reliably check path of cookie in php (or serverside language matter) or @ least browsers don't send path cookie. send key-value pairs.
if reliability/cross browser support isn't must, check if path of cookies send request headers. use method
<?php foreach (getallheaders() $name => $value) { echo "$name: $value\n"; } ?>
Comments
Post a Comment