HighDots Forums  

cookie issues

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss cookie issues in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
msa
 
Posts: n/a

Default cookie issues - 07-21-2004 , 08:48 AM






I am trying to put my brain around cookies (php/mysql) and thought I had
it, but pages aren't responding as planned.

I am using cookies to define access levels. when the user logs in they are
access level 1 or 2. There are several pages that the level 1 and 2 people
can see (although not the same pages) that non logged in people cannot. the
access level cookie is passing fine between the secure pages....did user
access by level:

if(!isset($HTTP_COOKIE_VARS['levelCookie'])){
header("Location: secure.php");
} else {
if($HTTP_COOKIE_VARS['levelCookie'] < 2){
header("Location: secure.php");
}
}

but when the logged in user travels around the non-secure pages, i loose the
cookie. i do not know how to pass it without using the user access
snippet....

i keep playing with setsession() and $HTTP_COOKIE_VARS, but am not hitting
on the right combo.

also would like to set cookie to 0 on any page, if user is not logged in.
and i cannot figure that out either.

PLEASE PLEASE PLEASE help me!!




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.