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
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