Jump to content

Cookies not being read


guymclaren

Recommended Posts

Creating of cookie is done on numerous pages.

 

I have tried letting the system create the cookie without adding the url, I tried the following

 

$coid = $_COOKIE["affiliate"];
if ($coid == NULL) {
$myid = $_GET['aff'];
			if ($myid != NULL){
			setcookie("affiliate","$myid", time()+5184000,"webtech.co.za");
			setcookie("affiliate","$myid", time()+5184000,"www.webtech.co.za");
		} 
}

 

It creates both cookies so in theory it should not matter whether they are using www or not, I also tried .webtech.co.za

 

The problem is the following code on an order page does not read the cookie or give any results.

 

$coid = $_COOKIE["affiliate"];
	$aff = $coid;
$fname = $_REQUEST['fname'];
	if ($fname != NULL) {

 

I am tearing my hair out, PHP hates me, but I cannot cope with MIcrosofts bullshit ASP anymore, please help?

 

 

Link to comment
https://forums.phpfreaks.com/topic/125067-cookies-not-being-read/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.