ok, I don't really understand what's going on whit this...
i'm making this site where user may log in. when he log in, php code set the cookies and redirect user on his account. account page (account.php) recognizes him with this code:

<?php
include "conn.php";
if(isset($_COOKIE['ID_my_site'])) { 
 	$name = $_COOKIE['ID_my_site']; 
	$pass = $_COOKIE['Key_my_site'];

...
and that works fine. but, on account page i put link to another, edit page (edit.php) where user can change some informations, and that page also starts with the same code:

<?php
include "conn.php";
if(isset($_COOKIE['ID_my_site'])) { 
 	$name = $_COOKIE['ID_my_site']; 
	$pass = $_COOKIE['Key_my_site'];

...
but this time, cookies are not set on this page!!! i mean, when i made it, it was working fine, and it still do on my computer, but when i try it on my girlfriends computer, account.php gets cookies and display page as it should, but than edit.php display my else statement:
...

} else {
echo "cookies NOT SET";
}
?>

i don't know if i explained my problem well, 'cuz i'm very confused with it.
thanks in advance!

ok, I don't really understand what's going on whit this...
i'm making this site where user may log in. when he log in, php code set the cookies and redirect user on his account. account page (account.php) recognizes him with this code:

<?php
include "conn.php";
if(isset($_COOKIE['ID_my_site'])) { 
 	$name = $_COOKIE['ID_my_site']; 
	$pass = $_COOKIE['Key_my_site'];

...
and that works fine. but, on account page i put link to another, edit page (edit.php) where user can change some informations, and that page also starts with the same code:

<?php
include "conn.php";
if(isset($_COOKIE['ID_my_site'])) { 
 	$name = $_COOKIE['ID_my_site']; 
	$pass = $_COOKIE['Key_my_site'];

...
but this time, cookies are not set on this page!!! i mean, when i made it, it was working fine, and it still do on my computer, but when i try it on my girlfriends computer, account.php gets cookies and display page as it should, but than edit.php display my else statement:
...

} else {
echo "cookies NOT SET";
}
?>

i don't know if i explained my problem well, 'cuz i'm very confused with it.
thanks in advance!

it is likely your girlfriend have stop cookie support in her web browser...

but it's not, and that's what's killing me... page "account.php" gets "name" variable from cookies, and it's working fine on every computer (including her's). "edit.php" asks for same cookies, using same code, but it doesn't get it. instead, it displays else statement:

if(isset($_COOKIE['ID_my_site'])) { 
...page content...
} else {
echo "cookies NOT SET";
}

i thought: ok, maybe something is wrong with her's browser settings, so i try it on two more computers and it seems it's working only on mine...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.