Cookies.....Oatmeal Or Peanut Butter?

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

User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Sorry, I meant $_COOKIE not $_COOKIES (lose the "S").

Time for a coffee me thinks ;)
Majoraslayer
Forum Commoner
Posts: 64
Joined: Thu Jun 30, 2005 11:50 am
Location: In Your Mind...
Contact:

Post by Majoraslayer »

d11wtq wrote:Heh.... I think you just wanna know how to even read the cookie in the first place right?

Code: Select all

$data = $_COOKIES['phpbb2mysql_data'];
$data = unserialize($data);

print_r($data);
I took the s off of COOKIES and it still isn't displaying anything. I put that script in a test page to see if it would display the contents of the cookie (I've only used the echo statement, but knowing how to program in BASIC I'm guessing print_r was supposed to display the value for $data). Is that script not supposed to display the cookie's information?
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Post by neophyte »

Peanut Butter!
Put this at the top of the pages you want to get user data from. Then you can get all the info you want out of the $userdata variable if the user is logged in.

Hope this helps.

Code: Select all

/////SET UP PHPBB VARIABLES AND USER DATA
    define('IN_PHPBB', true);
       $phpbb_root_path = 'ABSOLUTE/PATH/TO/YOUR/forum/';
       include($phpbb_root_path . 'extension.inc');
       include($phpbb_root_path . 'common.'.$phpEx);
       $userdata = session_pagestart($user_ip, PAGE_INDEX);
       init_userprefs($userdata);
Majoraslayer
Forum Commoner
Posts: 64
Joined: Thu Jun 30, 2005 11:50 am
Location: In Your Mind...
Contact:

Post by Majoraslayer »

Will that solve my cookie woes? All I need is for when the user returns to the site and has the cookie for the board they need to be recognized as logged in just like the board itself. Will that do that? Sorry if I seem like a dunce, but I currently know very little about PHP.

[Also, PEANUT BUTTER ROXXORS!!!]
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Post by neophyte »

Yuppers, I implemented it before. Implementing an external login can be done this way too. All you have to do to see if a user is logged in is:

Code: Select all

if($user_data['user_logged_in']){
  //do something
}else {
  //do something else
}
I'm pretty sure that will do it for you. If not it's because 'user_logged_in' is the wrong key. var_dump($user_data); to see the multitude of variables available to you throught this variable.
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Post by neophyte »

You might want to check out this thread too:

viewtopic.php?t=33377&highlight=phpbb
Majoraslayer
Forum Commoner
Posts: 64
Joined: Thu Jun 30, 2005 11:50 am
Location: In Your Mind...
Contact:

Post by Majoraslayer »

neophyte wrote:Yuppers, I implemented it before. Implementing an external login can be done this way too. All you have to do to see if a user is logged in is:

Code: Select all

if($user_dataї'user_logged_in']){
  //do something
}else {
  //do something else
}
I'm pretty sure that will do it for you. If not it's because 'user_logged_in' is the wrong key. var_dump($user_data); to see the multitude of variables available to you throught this variable.
I already got that far because I went through with the "Sharing sessions outside of phpBB" guide on the phpbb.com kb. Thanks for telling me, though. As far as checking if the user is logged in, I'm already doing it that way. I think my code is only checking the session, though, instead of the cookie. I'll post what my login test page PHP coding is, then maybe you can tell me how to implement your code into it. I might be able to figure it out, but just to make sure I don't screw it up...

Code: Select all

<?php
define('IN_PHPBB', true); 
$phpbb_root_path = './phpBB2/'; 
include($phpbb_root_path . 'extension.inc'); 
include($phpbb_root_path . 'common.'.$phpEx); 


// 
// Start session management 
// 
$userdata = session_pagestart($user_ip, PAGE_INDEX); 
init_userprefs($userdata); 
// 
// End session management 
//


//
// Check For Logged In
//
if( $userdataї'session_logged_in'] ) 
{ 
echo &quote;Welcome to ZD!&quote;; 
} 
else 
{ 
echo('Please Login'); 
include(&quote;includes/login.php&quote;);
}
//
// End Login Check
//


?>
The page works perfectly, except if you leave it and come back it doesn't recognize you as logged in like the board does.
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Post by neophyte »

Check your cookie domain in your configuration db. Make sure it is .yourdomain.com the dot in the front is important. You'll have access to cookies with http://www.yourdomain.com and domain.com and subdomain.mydomain.com (I think). phpBB doesn't use session cookies. Just the regular $_COOKIE variables. Double check your address bar if you login using your custom script make sure you come back to the same domain name as when you logged in. I don't see why your script wouldn't work other than you not getting access to the $_COOKIE variables. For testing I'd add:

Code: Select all

var_dump($user_data);
To see what you are getting.ome back to the same domain name as when you logged in. I don't see why your script wouldn't work other than you not getting access to the $_COOKIE variables. For testing I'd add:

Code: Select all

var_dump($user_data);
To see what you are getting..com and domain.com and subdomain.mydomain.com (I think). phpBB doesn't use session cookies. Just the regular $_COOKIE variables. Double check your address bar if you login using your custom script make sure you come back to the same domain name as when you logged in. I don't see why your script wouldn't work other than you not getting access to the $_COOKIE variables. For testing I'd add:

Code: Select all

var_dump($user_data);[/php your custom script make sure you come back to the same domain name as when you logged in. I don't see why your script wouldn't work other than you not getting access to the $_COOKIE variables. For testing I'd add:

Code: Select all

var_dump($user_data);
To see what you are getting.ee why your script wouldn't work other than you not getting access to the $_COOKIE variables. For testing I'd add:

Code: Select all

var_dump($user_data);
To see what you are getting.e dot in the front is important. You'll have access to cookies with http://www.yourdomain.com and domain.com and subdomain.mydomain.com (I think). phpBB doesn't use session cookies. Just the regular $_COOKIE variables. Double check your address bar if you login using domain in your configuration db. Make sure it is .yourdomain.com the dot in the front is important. You'll have access to cookies with http://www.yourdomain.com and domain.com and subdomain.mydomain.com (I think). phpBB doesn't use session cookies. Just the regular $_COOKIE variables. Double check your address bar if you login using your custom script make sure you come back to the same domain name as when you logged in. I don't see why your script wouldn't work other than you not getting access to the $_COOKIE variables. For testing I'd add:

Code: Select all

var_dump($user_data);
To see what you are getting.ookies with http://www.yourdomain.com and domain.com and subdomain.mydomain.com (I think). phpBB doesn't use session cookies. Just the regular $_COOKIE variables. Double check your address bar if you login using your custom script make sure you come back to the same domain name as when you logged in. I don't see why your script wouldn't work other than you not getting access toB doesn't use session cookies. Just the regular $_COOKIE variables. Double check your address bar if you login using your custom script make sure you come back to the same domain name as when you loggedss to cookies with http://www.yourdomain.com and domain.com and subdomain.mydomain.com (I think). phpBB doesn't use session cookies. Just the regular $_COOKIE variables. Double check your address bar if you login using your custom script make sure you come back to the same domain name as when you logged in. I don't see why your script wouldn't work other than you not getting access to the $_COOKIE variables. For testing I'd add:

Code: Select all

var_dump($user_data);
To see what you are getting. cookies with http://www.yourdomain.com and domain.com and subdomain.mydomain.com (I think). phpBB doesn't use session cookies. Just the regular $_COOKIE variables. Double check your address bar if you login using your custom script make sure you come back to the same domain name as when you logged in. I don't see why your script wouldn't work other than you not getting access to the $_COOKIE variables. For testing I'd add:

[php:1:f23b60c7b. I don't see why your script wouldn't work other than you not getting access to the $_COOKIE variables. For testing I'd add:

Code: Select all

var_dump($user_data);
To see what you are getting.

Code: Select all

var_dump($user_data);
To see what you are getting.tant. You'll have access to cookies with http://www.yourdomain.com and domain.com and subdomain.mydomain.com (I think). phpBB doesn't use session cookies. Just the regular $_COOKIE variables. Double check your address bar if you login using your custom script make sure you come back to the same domain name as when you logged in. I don't see why your script wouldn't work other than you not getting access to the $_COOKIE variables. For testing I'd add:

Code: Select all

var_dump($user_data);
To see what you are getting.t is .yourdomain.com the dot in the front is important. You'll have access to cookies with http://www.yourdomain.com and domain.com and subdomain.mydomain.com (I think). phpBB doesn't use session cookies. Just the regular $_COOKIE variables. Double check your address bar if you login using your custom script make sure you come back to the same domain name as when you logged in. I don't see why your script wouldn't work other than you not getting access to the $_COOKIE variables. For testing I'd add:

Code: Select all

var_dump($user_data);
To see what you are getting.main.com and subdomain.mydomain.com (I think). phpBB doesn't use session cookies. Just the regular $_COOKIE variables. Double check your address bar if you login using your custom script make sure you come back to the same domain name as when you logged in. I don't see why your script wouldn't work other than you not getting access to the $_COOKIE variables. For testing I'd add:

Code: Select all

var_dump($user_dataes. Double check your address bar if you login using your custom script make sure you come back to the same domain name as when you logged in. I don't see why your script wouldn't work other than you not getting access to the $_COOKIE variables. For testing I'd add:

Code: Select all

var_dump($user_data);
To see what you are getting.using your custom script make sure you come back to the same domain name as when you logged in. I don't see why your script wouldn't work other than you not getting acure it is .yourdomain.com the dot in the front is important. You'll have access to cookies with http://www.yourdomain.com and domain.com and subdomain.mydomain.com (I think). phpBB doesn't use session cookies. Just the regular $_COOKIE variables. Double check your address bar if you login using your custom script make sure you come back to the same domain name as when you logged in. I don't see why your script wouldn't work otes. Just the regular $_COOKIE variables. Double check your address bar if you login using your custom script make sure you come back to the same domain name as when you logged in. I don't see why your script wouldn't woesn't use session cookies. Just the regular $_COOKIE variables. Double check your address bar if you login using your custom script make sure you come back to the same domain name as when you logged in. I don't see why your script wouldn't work other than you not getting access to the $_COOKIE variables. For testing I'd add:

Code: Select all

var_dump($user_data);
To see what you are getting._data);

To see what you are getting.n.com and domain.com and subdomain.mydomain.com (I think). phpBB doesn't use session cookies. Just the regular $_COOKIE variables. Double check your address bar if you login using your custom script make sure you come back to the same domain name as when you logged in. I don't see whyfiguration db. Make sure it is .yourdomain.com the dot in the front is important. You'll have access to cookies with http://www.yourdomain.com and domain.com and subdomain.mydomain.com (I think). phpBB doesn't use session cookies. Just the regular $_COOKIE variables. Double check your address bar if you login using your custom script make sure you come back to the same domain name as when you logged in. I don't see why your script wouldn't work other than you not getting access to the $_COOKIE variables. For testing I'd add:

Code: Select all

var_dump($user_data);
To see what you are getting. cookies. Just the regular $_COOKIE variables. Double check your address bar if you login using your custom script make sure you come back to the same domain name as when you logged in. I don't see why your script wouldn't work other than you not getting access to the $_COOKIE variables. For testing I'd add:

Code: Select all

var_dump($user_data);
To see what you are getting.it is .yourdomain.com the dot in the front is important. You'll have access to cookies with http://www.yourdomain.com and domain.com and subdomain.mydomain.com (I think). phpBB doesn't use session cookies. Just the regular $_COOKIE variables. Double check your address bar if you login using your custom script make sure you come back to the same domain name as when you logged in. I don't see why your script wouldn't work other than you not getting access to the $_COOKIE variables. For testing I'd add:

Code: Select all

var_dump($user_data);
To see what you are getting.ure it is .yourdomain.com the dot in the front is important. You'll have access to cookies with http://www.yourdomain.com and domain.com and subdomain.mydomain.com (I think). phpBB doesn't use session cookies. Just the regular $_COOKIE variables. Double check your address bar if you login using your custom script make sure you come back to the same domain name as when you logged in. I don't see why your script wouldn't work other than you not getting access to the $_COOKIE variables. For testing I'd add:

Code: Select all

var_dump($user_data);[/php:1:f23bonfiguration db. Make sure it is .yourdomain.com the dot in the front is important. You'll have access to cookies with http://www.yourdomain.com and domain.com and subdomain.mydomain.com (I think).  phpBB doesn't use session cookies. Just the regular $_COOKIE variables. Double check your address bar if you login using your custom script make sure you come back to the same domain name as when you logged in. I don't see why your script wouldn't work other than you not getting access to the $_COOKIE variables. For testing I'd add:

Code: Select all

var_dump($user_data);
To see what you are getting.ith http://www.yourdomain.com and domain.com and subdomain.mydomain.com (I think). phpBB doesn't use session cookies. Just the regular $_COOKIE variables. Double check your address bar if you login using your in your configuration db. Make sure it is .yourdomain.com the dot in the front is important. You'll have access to cookies with http://www.yourdomain.com and domain.com and subdomain.mydomain.com (I think). phpBB doesn't use session cookies. Just the regular $_COOKIE variables. Double check your address bar if you login using your custom script make sure you come back to the same domain name as when you logged in. I don't see why your script wouldn't work other than you not getting access to the $_COOKIE variables. For testing I'd adis .yourdomain.com the dot in the front is important. You'll have access to cookies with http://www.yourdomain.com and domain.com and subdomain.mydomain.com (I think). phpBB doesn't use session cookies. Just the regular $_COOKIE variables. Double check your address bar if you login using your custom script make sure you come back to the same domain name asin the front is important. You'll have access to cookies with http://www.yourdomain.com and domain.com and subdomain.mydomain.com (I think). phpBB doesn't use session cookies. Just the regular $_COOKIE variables. Double check your address bar if you login using your custom script make sure you come back to the same domain name as when you logged in. I don't see why your script wouldn't work other than you not getting access to the $_COOKIE variables. For testing I'd add:

Code: Select all

var_dump($user_data);
To see what you are think). phpBB doesn't use session cookies. Just the regular $_COOKIE variables. Double check your address bar if you login using your custom script make sure you come back to the same domain name as when you logged in. I don't see why your script wouldn't work other than you not getting access to the $_COOKIE variables. For testing I'd add:

Code: Select all

var_dump($user_data);
To see what you are getting.domain in your configuration db. Make sure it is .yourdomain.com the dot in the front is important. You'll have access to cookies with http://www.yourdomain.com and domain.com and subdomain.mydomain.com (I think). phpBB doesn't use session cookies. Just the regular $_COOKIE variables. Double check your address bar if you login using your custom script make sure you come back to the same domain name as when you logged in. I don't see why your script wouldn't work other than you not getting access to the $_COOKIE variables. For testing I'd add:

Code: Select all

var_dump($user_data);
To see what you are getting.the dot in the front is important. You'll have access to cookies with http://www.yourdomain.com and domain.com and subdomain.mydomain.com (I think). phpBB doesn't use session cookies. Just the regular $_COOKIE variables. Double check your address bar if you login using your custom script make sure you come back to the same domain name as when you logged in. I don't see why your script wouldn't work other than you not getting access to the $_COOKIE variables. For testing I'd add:

Code: Select all

var_dump($user_data);
To see what you are getting.domain in your configuration db. Make sure it is .yourdomain.com the dot in the front is important. You'll have access to cookies with http://www.yourdomain.com and domain.com and subdomain.mydomain.com (I think). phpBB doesn't use session cookies. Just the regular $_COOKIE variables. Double check your address bar if you login using your custom script make sure you come back to the same domain name as when you logged in. I don't see why your script wouldn't work other than you not getting access to the $_COOKIE variables. For testing I'd add:

Code: Select all

var_dump($user_data);[/phpont is important. You'll have access to cookies with http://www.yourdomain.com and domain.com and subdomain.mydomain.com (I think).  phpBB doesn't use session cookies. Just the regular $_COOKIE variables. Double check your address bar if you login using your custom script make sure you come back to the same domain name as when you logged in. I don't see why your script wouldn't work other than you not getting access to the $_Ck).  phpBB doesn't use session cookies. Just the regular $_COOKIE variables. Double check your address bar if you login using your custom script make sure you come back to the same domain name as when you logged in. I don't see why your script wouldn't work other than you not getting access to the $_COOKIE variables. For testing I'd add:

Code: Select all

var_dump($user_data);
To see what you are getting. check your address bar if you login using your custom script make sure you come back to the same domain name as when you logged in. I don't see why your script wouldn't work other than you not getting access to the $_COOKIE variables. For testing I'd add:

Code: Select all

var_dump($user_data);
To see what you are getting.er than you not getting access to the $_COOKIE variables. For testing I'd add:

Code: Select all

var_dump($user_data);
To see what youain.com the dot in the front is important. You'll have access to cookies with http://www.yourdomain.com and domain.com and subdomain.mydomain.com (I think). phpBB doesn't use session cookies. Just the regular $_COOKIE variables. Double check your address bar if you login using your custom script make sure you come back to the same domain name as when you logged in. I don't see w with http://www.yourdomain.com and domain.com and subdomain.mydomain.com (I think). phpBB doesn't use session cookies. Just the regular $_COOKIE variables. Double check your address bar if you login using your custom script make sure you come back to the same domain name as when you logged in. I don't see why your script wouldn't work other than you not getting access to the $_COOKIE variables. For testing I'd add:

Code: Select all

var_dump($user_data);
To see what you are getting.. Double check your address bar if you login using your custom script make sure you come back to the same domain name as when you logged in. I don't see why your script wouldn't work other than you not getting access to the $_COOKIE variables. For testing I'd add:

[phpoesn't use session cookies. Just the regular $_COOKIE variables. Double check your address bar if you login using your custom script make sure you come back to the same domain name as when you logged in. I don't see why your script wouldn't work other than you not getting access to the $_COOKIE variables. For testing I'd add:

Code: Select all

var_dump($user_data);
To see what you are getting.e you come back to the same domain name as when you logged in. I don't see why your script wouldn't work other than you not getting access to the $_COOKIE variables. For testing I'd add:

Code: Select all

var_dump($user_data);
To see what you are getting. phpBB doesn't use session cookies. Just the regular $_COOKIE variables. Double check your address bar if you login using your custom script make sure you come back to the same domain name as when you logged in. I don't see why your script wouldn't work other than you not getting access to the $_COOm and domain.com and subdomain.mydomain.com (I think). phpBB doesn't use session cookies. Just the regular $_COOKIE variables. Double check your address bar if you login using your custom script make sure you come back to the same domain name as when you logged in.ront is important. You'll have access to cookies with http://www.yourdomain.com and domain.com and subdomain.mydomain.com (I think). phpBB doesn't use session cookies. Just the regular $_COOKIE variables. Double check your address bar if you login using your custom script make sure you come back to the same domain name as when you logged in. I don't see why your script wouldn't work other than you not getting access to the $_COOKIE variables. For testing I'd add:

Code: Select all

var_dump($user_data);
To see what you are getting.
joetheeskimo5
Forum Commoner
Posts: 43
Joined: Sun Dec 14, 2003 4:47 pm
Location: US
Contact:

Post by joetheeskimo5 »

Majoraslayer wrote: nothing is being displayed when I print or echo $data. I know I have that cookie because I'm logged into my forum. Any reason why that is?
That code is unusual, I don't know if I can call it buggy, but try this instead and see if it works:

Code: Select all

$data = $_COOKIE['phpbb2mysql_data'];
$normaldata = unserialize($data);

echo $normaldata;
unserialize($data);

echo $normaldata;
that is?[/quote]

That code is unusual, I don't know if I can call it buggy, but try this instead and see if it works:

Code: Select all

$data = $_COOKIE['phpbb2mysql_data'];
$normaldata = unserialize($data);

echo phpbb2mysql_data'];
$normaldata = unserialize($data);

echo $normaldata;
ata. I know I have that cookie because I'm logged into my forum. Any reason why that is?[/quote]

That code is unusual, I don't know if I can call it buggy, but try this instead and see if it works:

Code: Select all

$da"Majoraslayer"]
nothing is being displayed when I print or echo $data.  I know I have that cookie because I'm logged into my forum.  Any reason why that is?[/quote]

That code is unusual, I don't know if I can call it buggy, but try this instead and see if it works:

Code: Select all

$data = $_COOKIE['phpbb2mysql_data'];
$normaldata = unserialize($data);

echo $normaldata;
my forum. Any reason why that is?[/quote]

That code is unusual, I don't know if I can call it buggy, but try this instead and see if it works:

Code: Select all

$data = $_COOKIE['phpbb2mysql_data'];
$normaldata = unserialize($data);

echo $normaldata;
ow if I can call it buggy, but try this instead and see if it works:

Code: Select all

$data = $_COOKIE['phpbb2mysqd into my forum.  Any reason why that is?[/quote]

That code is unusual, I don't know if I can call it buggy, but try this instead and see if it works:

Code: Select all

$data = $_COOKIEї'phpbb2mysql_data'];
$normaldata = unserialize($data);

echo $normaldata;
o my forum. Any reason why that is?[/quote]

That code is unusual, I don't know if I can call it buggy, but try this instead and see if it works:

Code: Select all

$data = $_COOKIE['phpbb2mysql_data'];
$normaldata = unserialize($data);

echo $normaldata;
3be317]okie because I'm logged into my forum. Any reason why that is?[/quote]

That code is unusual, I don't know if I can call it buggy, but try this instead and see if it works:

Code: Select all

$data = $_COOKIE['phpbb2mysql_data'];
$normaldata = unserialize($data);

echo $normaldata;
when I print or echo $data. I know I have that cookie because I'm logged into my forum. Any reason why that is?[/quote]

That code is unusual, I don't know if I can call it buggy, but try this instead and see if it works:

Code: Select all

$data = $_COOKIE['phpbb2mysql_data'];
$normaldata = unserialize($data);

echo $normaldata;
uote]

That code is unusual, I don't know if I can call it buggy, but try this instead and see if it works:

Code: Select all

$data = $_COOKIE['phpbb2mysql_data'];
$normaldata = unserialrks:

Code: Select all

$data = $_COOKIE['phpbb2mysql_data'];
$normaldata = unserialize($data);

echo $normaldata;
111;'phpbb2mysql_data'];
$normaldata = unserialize($data);

echo $normaldata;
ayed when I print or echo $data. I know I have that cookie because I'm logged into my forum. Any reason why that is?[/quote]

That code is unusual, I don't know if I can call it buggy, but try this instead and see if it works:

Code: Select all

$data = $_COOKIE['phpbb2mysql_data'];
$normaldata = unserialize($data);

echo $normaldata;
[/php:1but try this instead and see if it works:

Code: Select all

$data = $_COOKIEї'phpbb2mysql_data'];
$normaldata = unserialize($data);

echo $normaldata;
if I can call it buggy, but try this instead and see if it works:

Code: Select all

$data = $_COOKIE['phpbb2mysql_data'];
$normaldata = unserialize($data);

echo $normaldata;
that is?[/quote]

That code is unusual, I don't know if I caothing is being displayed when I print or echo $data. I know I have that cookie because I'm logged into my forum. Any reason why that is?[/quote]

That code is unusual, I don't know if I can call it buggy, but try this instead and see if it works:

Code: Select all

$data = $_COOKIE['phpbb2mysql_data'];
$normaldata = unserialize($data);

echo $normaldata;
uggy, but try this instead and see if it works:

Code: Select all

$data = $_COOKIE['phpbb2mysql_data'];
$normaldata = unserialize($data);

echo $normaldata;
when I print or echo $data. I know I have that cookie because I'm logged into my forum. Any reason why that is?[/quote]

That code is unusual, I don't know if I can call it buggy, but try this instead and see if it works:

Code: Select all

$data = $_COOKIE['phpbb2mysql_data'];
$normaldata = unserialize($data);

echo $normaldata;
ayed when I print or echo $data. I know I have that cookie because I'm logged into my forum. Any reason why that is?[/quote]

That code is unusual, I don't know if I can call it buggy, but try this instead and see if it works:

Code: Select all

$data = $_COOKIE['phpbb2mysql_data'];
$normaldata = unserialize($data);

echo $normaldata;
nothing is being displayed when I print or echo $data. I know I have that cookie because I'm logged into my forum. Any reason why that is?[/quote]

That code is unusual, I don't know if I can call it buggy, but try this instead and see if it works:

Code: Select all

$data = $_COOKIE['phpbb2mysql_data'];
$normaldata = unserialize($data);

echo $normaldata;
. Any reason why that is?[/quote]

That code is unusual, I don't know if I can call it buggy, but try this instead and see if it works:

Code: Select all

$dataaslayer"]
nothing is being displayed when I print or echo $data.  I know I have that cookie because I'm logged into my forum.  Any reason why that is?[/quote]

That code is unusual, I don't know if I can call it buggy, but try this instead and see if it works:

Code: Select all

$data = $_COOKIEї'en I print or echo $data.  I know I have that cookie because I'm logged into my forum.  Any reason why that is?[/quote]

That code is unusual, I don't know if I can call it buggy, but try this instead and see if it works:

Code: Select all

$data = $_COOKIE['phpbb2mysql_data'];
$normaldata = unserialize($data);

echo $normalI know I have that cookie because I'm logged into my forum.  Any reason why that is?[/quote]

That code is unusual, I don't know if I can call it buggy, but try this instead and see if it works:

Code: Select all

$data = $_COOKIEї'phpbb2mysql_data'];
$normaldata = unserialize($data);

echo $normaldata;
[/php:1:257l, I don't know if I can call it buggy, but try this instead and see if it works:

Code: Select all

$data = $_COOKIE['phpbb2mysql_data'];
$normaldata = unserialize($data);

echo $normaldata;
"Majoraslayer"]
nothing is being displayed when I print or echo $data. I know I have that cookie because I'm logged into my forum. Any reason why that is?[/quote]

That code is unusual, I don't know if I can call it buggy, but try this instead and see if it works:

Code: Select all

$data = $_COOKIE['phpbb2mysql_data'];
$normaldata = unserialize($data);

echo $normaldata;
$data. I know I have that cookie because I'm logged into my forum. Any reason why that is?[/quote]

That code is unusual, I don't know if I can call it buggy, but try this instead and see if it works:

Code: Select all

$data = $_COOKIE['phpbb2mysql_data'];
$normaldata = unserialize($data);

echo $normaldata;
"Majoraslayer"]
nothing is being displayed when I print or echo $data. I know I have that cookie because I'm logged into my forum. Any reason why that is?[/quote]

That code is unusual, I don't know if I can call it buggy, but try this instead and see if it works:

Code: Select all

$data = $_COOKIEї'phpbb2mysql_data'];
$normaldata = unserialize($dahave that cookie because I'm logged into my forum.  Any reason why that is?[/quote]

That code is unusual, I don't know if I can call it buggy, but try this instead and see if it works:

Code: Select all

$data = $_COOKIE['phpbb2 don't know if I can call it buggy, but try this instead and see if it works:

Code: Select all

$data = $_COOKIE['phpbb2mysql_data'];
$normaldata = unserialize($data);

echo $normaldata;
hp]
$data = $_COOKIE['phpbb2mysql_data'];
$normaldata = unserialize($data);

echo $normaldata;
or echo $data. I know I have that cookie because I'm logged into my forum. Any reason why that is?[/quote]

That code is unusual, I don't know if I can call it buggy, but try this instead and see if it works:

Code: Select all

$data = $_COOKIE['phpbb2mysql_data'];
$normaldata = unserialize($data);

echo $normaldata;
um. Any reason why that is?[/quote]

That code is unusual, I don't know if I can call it buggy, but try this instead and see if it works:

Code: Select all

$data = $_COOKIE['phpbb2mysql_data'];
$normaldata = unserialize($data);

echo $normaldata;
s:

Code: Select all

$data = $_COOKIE['phpbb2mysql_data'];
$normaldata = unserialize($data);

echo $normaldata;
if I can call it buggy, but try this instead and see if it works:

Code: Select all

$data = $_COOKIE['phpbb2mysql_data'];
$normaldata = unserialize($data);

echo $normaldata;
data = unserialize($data);

echo $normaldata;
n't know if I can call it buggy, but try this instead and see if it works:

Code: Select all

That code is unusual, I don't know if I can call it buggy, but try this instead and see if it works:

Code: Select all

$data = $_COOKIE['phpbb2mysql_data'];
$normaldata = unserialize($data);

echo $normaldata;
That code is unusual, I don't know if I can call it buggy, but try this instead and see if it works:

Code: Select all

$data = $_COOKIE['phpbb2mysql_data'];
$normaldata = unserialize($data);

echo $normaldata;
Majoraslayer
Forum Commoner
Posts: 64
Joined: Thu Jun 30, 2005 11:50 am
Location: In Your Mind...
Contact:

Post by Majoraslayer »

Well, I managed to fix the problem. All I had to do was change my cookie settings. The cookie domain had to be changed to .zorasdomain.com, but the cookie path had to be left at "/".

I appreciate all the help! Well, I have another task to work on with this script so I may just start a new topic for it. If anyone knows the variable I need to check for the user level in phpBB, could you tell me? Thanx!
Post Reply