Hi I want to password protect some other pages that live next to my forum but cant isolate the login check from the header inc. Can anyone point me at the right bits of code>?
incidentally Ive searched the forum for ages and the universal login although helpful isnt quite doing it for me :)
hi dayve, there wont be moderators other than 1 person whos adminning the whole thing.Infac tthere s a set number of users so no registrants either. Basically theres say 4 pages open to everyone and then 4pages plus the forum that are password protected. Seemed sensible to use the same login as the forum for these 4 pages otherwise you would just spend your time logging in :) ideally you wouldnt be able to see the forum either if you wernt logged in. I considered doing a seperate login check using a session. Does the snitz forum store the 'logged in or not' value somewhere it can be accessed outside the header_inc?
seems you are a fan of oil filled heaters? :) or an affiliate scheme
not really... I am a fan of Nine Inch Nails which is the mind-child of one Trent Reznor who's family used to own Reznor Heaters. .
I was going to say that if you're just wanting to allow these pages to have access based on whether or not they are a forum member, you can just use the cookies that are set by the forum to grant access to these pages. For example, on the pages you're trying to protect, add these lines:
The reason Snitz01 is in red is because this is the prefix that is set in config.asp. If you changed this, then you will need to change it in the cookie request as well.
Then you can do a conditional check like so (this is an extremely simplistic example):
if strDBNTUserName <> "" ' member is logged on to Snitz
...your web page code here
end if
or some variation of above. is this something like what you want to do or are you thinking of a different approach? if you want to use the passwords that are already in the Snitz database, then you can take advantage of a simple sql statement using the sha256 function for authentication.