calling all cookie problems that is

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Elfstone
Forum Newbie
Posts: 21
Joined: Tue Jun 11, 2002 2:25 am
Location: NJ, USA

Post by Elfstone »

That shouldn't be the problem, then. Did you make a page to see if it will echo the values appropriately?
User avatar
cheatboy00
Forum Contributor
Posts: 151
Joined: Sat Jun 29, 2002 10:36 am
Location: canada
Contact:

Post by cheatboy00 »

yes and the output from the 2 cookies are correct.... i duno whats wrong
User avatar
hob_goblin
Forum Regular
Posts: 978
Joined: Sun Apr 28, 2002 9:53 pm
Contact:

Post by hob_goblin »

Code: Select all

if (isset($cbaa) && ($cbaa == "user")){ 
   include ("ucp.php"); 
}
try changing that to

Code: Select all

if (isset($cbaa) && $cbaa == "user"){ 
   include ("ucp.php"); 
}
User avatar
cheatboy00
Forum Contributor
Posts: 151
Joined: Sat Jun 29, 2002 10:36 am
Location: canada
Contact:

Post by cheatboy00 »

nope ... $cbaa wont work i tried outputting that cookie (saying if isset ($cbaa.... well it didnt work), i went back to the $logcbaa and i finally foudn out something that works.....

Code: Select all

$s = "n";

               if ($page == 'login'){
                  include ("l.php");
               }
 
               else if (isset($logcbaa) && ($logcbaa == 'user')){
                  $s = "y"; 
                  include ("ucp.php"); 
               }   

               else if (isset($logcbaa) && ($logcbaa == 'staff')){
                  $s = "y"; 
                  include ("scp.php"); 
               }   

               else if (isset($logcbaa) && ($logcbaa == 'admin')){
                  $s = "y";
                  include ("acp.php");
               }

              if ($page != 'login' && $s == 'n'){
                  include ("log.php");
               }
it was the whole problem with the $page thing see i had that if as teh main if to the whole thing and obivously when i changed pages to somethign other than the login value it would go there and not look at the rest casue it was the if was fofilled... if you know what i'm talking about, anyway that worked for the most part but it still showed the log.php file underneath the control panel so i just made a simple variable to correct that making sure that none of the control panels were active...

ug man this was teh B****est problem i've ever faced.... erg...

i won i go to sleep now its 4:54 am
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

You may want to consider using $_COOKIE['logcbaa'] so that the information can't be passed through the query string.

Mac
Post Reply