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
Check this out in the Perl forum, as Perl would probably be the best method for reading a cookie...
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)
I want to have a members only type feature, so the html files in the header navigation bar, is only accessible to members.
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.
how might I go about using perl to do this?