Questions tagged as 'cookies'

1
answer

Problems with displaying cookies

I have a Cookie set with the name 68 and value 68, it appears in the cookies settings in the browser, but on pages it works and in others it simply does not exist $id_imovel = (isset($_COOKIE[$id_imovel_form])) ? $_COOKIE[$id_imovel...
asked by 11.09.2016 / 19:53
2
answers

How to access COOKIE on another page?

I have a file in which it creates a cookie. And I have another file in which I call this cookie, but it gives me this error: Undefined index: name in Here is the code for the first file: setcookie('nome', $dataNome', time() + (2 * 3600));...
asked by 28.08.2014 / 22:02
1
answer

Save form data in cookie and popular form with this data after reload of the page

I have a page with filters, being 4 selects, an input search, 2 input date and a submit, I need to keep the data selected after reloading the page. In other words, I put the data to filter and after clicking the submit and the load page it ne...
asked by 27.04.2017 / 20:17
2
answers

Restrict .htacess rules to only one folder

I need to optimize a page that is inside a / site folder and would like to enable cookies, but they can not be enabled for the other folders. How can I make a condition or rule that limits only this folder? Code ExpiresActive On Expire...
asked by 17.03.2017 / 18:37
1
answer

How do I save Cookies permanently and retrieve them later? [Android]

I have a Android application that makes a request next to a Web server and later saves three Cookies in a CookieStore . However, I would like to store these Cookies so that when the application is restarted no new request is...
asked by 20.04.2016 / 03:53
1
answer

Button with cookie and location

At the top of my page is the cookie: <?php setcookie("agenda","2016");?> At the bottom of the page, without using form, I have the following button: <button class="button button1" onclick="location.href='escolha_sala....
asked by 10.04.2016 / 19:45
0
answers

Foreach in checkbox for cookie

How do I make a Form with Foreach in 200 Checkbox and send the selected Checkbox results to a Cookie?     
asked by 29.04.2016 / 01:43
0
answers

Write two cookies, one for the root and one for a subpage

I want to use a cookie on my site to change my style, but I have conflicts, I asked the question at this link: Stylesheet with cookie works only on the second instead The solution of Bacco presented worked, but I realized that another pr...
asked by 12.03.2016 / 05:21
1
answer

How to block the login on 2 devices?

I'm developing an application in PHP where the user can stay logged in even after logging off using cookies. However, the user can not stay connected on 2 devices simultaneously. Being more specific, what I would like to know is: How do I mak...
asked by 03.10.2015 / 20:35
2
answers

PHP - Cookies, how to detect if it is created

How do I detect if a cookie exists? My cookie is created like this: setcookie("log", "true", time()+60, "/classes"); And to detect I'm trying this: if (!isset($_COOKIE['log'])) { //função } But it does not detect the cookie, it r...
asked by 12.09.2016 / 19:12