Log in

View Full Version : how to access variables on a external page....


willms_jay
03-09-2003, 08:57 PM
Ok, I'm sure this has been asked many times before, but I've never recieved a straight answer!

How can I access certain variables (like the userid for example) from an external page. eg. test.php

I know if the user has cookies on, i can do this :



<?php

$bbuserid = $HTTP_COOKIE_VARS['bbuserid'];

echo $bbuserid;

?>



which would display the users current user number....

but this only works half the time. what if the user does not have cookies installed?

any hints here on a more reliable way to do this?

thanks.

..jordan willms

willms_jay
03-09-2003, 09:44 PM
nevermind figured it out, HOWEVER.

what else is contained within $bbuserinfo...

i mean, i know you can get username, userid, etc... what else can you get?

..jordan willms

filburt1
03-09-2003, 10:36 PM
echo "<pre>";
print_r($bbuserinfo);
echo "</pre>";

I believe it's just a cached row from the user table plus some random additional things. It even contains the user's passhash.

Dean C
03-10-2003, 04:04 PM
* Mist likes that print_r function :)

*memorizes it*

- miSt