www.webdeveloper.com
Results 1 to 3 of 3

Thread: cookies

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    UK
    Posts
    630

    cookies

    im having a problem with a VERY simple template selector im makeing.

    when i change templatres you need to refresh to get the new skin even with header("location:

    PHP Code:
    //template selection
    if ($cookie == 1)
        {
        
    setcookie('kj_skin'0);
        
    header("Location: http://www.knowj.com");
        exit;
        }
    else if (
    $cookie == 2)
        {
        
    setcookie('kj_skin'2);
        
    header("Location: http://www.knowj.com");
        exit;
        }
    if (
    $_COOKIE['kj_skin'] == 0)
        {
        include 
    "includes/header.php";
        }
    else if (
    $_COOKIE['kj_skin'] == 1)
        {
        include 
    "includes/header2.php";
        } 
    Last edited by knowj; 09-19-2006 at 10:46 AM.

  2. #2
    Join Date
    Aug 2005
    Location
    The Garden State
    Posts
    5,634
    what's the problem though?
    Acceptable Use | SQL Forum FAQ | celery is tasteless | twitter

    celery is tasteless - currently needing some UI time

  3. #3
    Join Date
    Oct 2005
    Location
    UK
    Posts
    630
    sorry solved the problem n00b mistake.

    had some of the code in the wrong order.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles