Hot answers tagged


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 only – Important note: IE will always send to subdomains regardless


You have posted snippets that are using two separate means of updating the form. The javascript-leveraging snippet is updating the form AFTER the form elements have already been generated. This means that the standard form for all users is adjusted at the last moment to apply the cookie values to the fields for that specific user -- seems like the right ...


For one, you are declaring: $inputCookie->set('rsformdatacountry', $_POST['form']['country']); 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'); ...

Only top voted, non community-wiki answers of a minimum length are eligible