UBB.Dev
Posted By: JohnGoodie Help on check ubb cookies? - 03/08/2002 1:01 AM
I am not sure if this is the right forum, but I was wondering if anyone knew what code to put into the header of an html file that would read the viewers cookies and find if they had logged in to the ubb, and if it didn't find it, then it would take them to a different page.

I don't really know how to do this, and was wondering if someone could help me out here.

Thanks

John
Posted By: Matt Jacob Re: Help on check ubb cookies? - 03/08/2002 7:20 AM
Check this out in the Perl forum, as Perl would probably be the best method for reading a cookie...
Posted By: LK Re: Help on check ubb cookies? - 03/08/2002 7:38 AM
If you want it just for the UI (to say "Welcome, nick"), use JavaScript.

If you want to have member-only features, use Perl.

JavaScript code:
[code][/code]Change "2451942.1205" to your cookie # (download vars_config.cgi from the server or look for the code above in your ultimatebb.cgi's output)
Posted By: JohnGoodie Re: Help on check ubb cookies? - 03/09/2002 7:39 AM
I want to have a members only type feature, so the html files in the header navigation bar, is only accessible to members.
Posted By: LK Re: Help on check ubb cookies? - 03/09/2002 7:57 AM
If you want it to be members-only because it shows some information, use Perl. But if you want it to be members-only because you want to link to 'my profile', 'new topic'/etc, you can use JavaScript.
Posted By: JohnGoodie Re: Help on check ubb cookies? - 03/15/2002 4:11 AM
how might I go about using perl to do this?
© UBB.Developers