Skip to content
Advertisement

Tag: cookies

Session and cookie lost when clicking a link from Gmail! Very Bizzzare

Brief Summary When I click a link from gmail, the cookies and sessions are lost. But if I copy the link in gmail and paste it in a blank tab, the cookies are retained! Long Detail At www.mydomain.com, i set cookies and PHP session with following options: $myCookieSessionOptions = array( ‘lifetime’ => (time() + 60*60*24*363), ‘path’ => “/”, ‘domain’ =>

Deleted all cookies on wordpress.com now I am getting logged out

I wanted to delete all cookies on my wordpress.com website so that one of my popups should continue appearing. This is the code that I wrote in my function.php file: After I saved this I kept on getting logged out of WordPress because I had deleted all my cookies. I tried removing it from functions.php and saving the file but

Cookie values not being returned in Firefox

This works totally fine on my local dev version in all browsers… …and will return all the current cookie values on the page, like this: The problem is that it doesn’t return anything in Firefox or Edge on production. It does work in Chrome on production though. Here’s how Chrome dev tools sees the cookies on my local version: …and

How to send the PHP value back to the HTML form?

I’ve been trying to build a program using PHP cookies. The user interface basically looks like this. My basic program The logic is this. When the user enters the product name, price and quantity and clicks on the “Add” button, the total value which is price*quantity will fall on the “Total bill value” textbox. The user can go on adding

Why cookies are added rather than changed?

I am developing a site where each user should have their own id. When I went into the console, I saw that the id was duplicated instead of being one. Is this normal and should it be? Answer Cookies, by default, use the path of the page that they are set for. You should explicitly set the path to /

Invalid character in cookie name beyond what is listed in the error message

I am getting the error: Cookie names cannot contain any of the following ‘=,; trn1314’; However, I have php code to replaced these characters before calling setcookie: It seems that setcookie chokes on other characters as well. When I test the contents of $name using the code below, I get the following Output: Can you help me add to my

How to save data into cookie in PHP from PDO

I need some help as have been stuck here for a while, please bear with me as am a rookie and perhaps this might be simple to a seasoned developer, basically am trying to save data into a cookie so that i only hit the database once, after that, I want when i reload the page to get my data

Advertisement