Jump to content

Recommended Posts

<?php
if(!isset($_COOKIE['cms_theme'])) {
	$r = $cms->cquery('theme');
	setcookie('cms_theme', $r);
	$url = $_SERVER['REQUEST_URI'];
	header("Location: $url");
} elseif (isset($_GET['theme'])) {
	$get = escape_data($_GET['theme']);
	setcookie('cms_theme', $get);
	$url = $parts[0]; //$parts[0] = everything before the ?
	header("Location: $url");
}
?>

 

Problem, whenever i view example.com and then view example.com/programs/ i keep getting more cookies made. Ive installed an addon in FF so i can see what cookies are related to the website i'm working on and it's path shows / and the others /programs/.

 

How is a path set for a cookie so that no matter where the cookie is called wether it be / or /programs/ or /gui/ it's always the same one.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.