The ‘Domain’ Attribute
• With domain set, cookies will be sent to that domain
and all its subdomains
• The risk with subdomains is lower than when scoped to
parent domain, but still relevant
• Remove domain attribute to limit cookie to origin host
– Important note: IE will always send to subdomains regardless
You have posted snippets that are using two separate means of updating the form.
For one, you are declaring:
This means that the rsformdatacountry cookie value is a string (not an array). This is appropriate assuming that your form is not allowing multiple selections.
When you call it, use:
$activeCountry = $inputCookie->get('rsformdatacountry', '', 'string');