Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cookies help needed please

Status
Not open for further replies.

osh

Technical User
Aug 24, 2002
3
US
I have cross posted this in the perl form as well..

I have a cgi progran that uses the following to check for a cookie on a users browser and then let him access the program.

sub checkpass {
if (!((&getCookie('admin') eq $password)||((($user_data{password} eq $password)||(eval(crypt($user_data{password},substr(crypt($user_data{password},'9A$ghj&7ecb9!11x'),5,2))) eq 'rcFFTesTLKr2g'))&&($user_data{cgifunction} eq "admin")))) {

I would like to use the same function to check if the cookie is there with a static page, if it is let him see it and if it is not re-direct him ti amother page.

I was hoping this could be done in javascript but I have never used cookies in JS before.

Any help would be much appreciated.

Thanks
Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top