sub GetLogin{ &GetCookies; $in{'UserName'} = $cookie{'UserName'}; $in{'PassWord'} = $cookie{'PassWord'}; if(!$in{'UserName'}){ &PageOut('t_login.htm'); exit; #back where you started, though the Javascript sees that it never comes here } else{ (($in{'UserName'} ne $username)||(($in{'PassWord'} ne $password)))&&(&PError("Error. Invalid username or password")); #here we need to check the final results after parsing the cookie info and retrieving matches in the db of variables... we have no choice but to return a server error message. } }