in reply to Re^4: Testing for existence of cookies
in thread Testing for existence of cookies

You want to welcome the user back if the 'Name' cookie is not defined? Are you sure this is right? The logic in the code doesn't match what you say you want in the description.

What's happening? You say you're not getting an error, but what are you getting? Where are you printing the message string?

Larry

Replies are listed 'Best First'.
Re^6: Testing for existence of cookies
by bigjoe11a (Novice) on Jun 26, 2005 at 21:26 UTC
    At the beginning, Like I said, if I use if (!defined($cgi->cookie('name'))) I don't get any errors, It just doesn't work. when I tryed if (defined($cgi->cookie('name'))) I keep geting a 500 internal server error. The script won't run. I know that the ! means not defined. But thats not what I want. I want to is if one of 3 is defined and then do some thing. I have to make changes so I could get this script running, its just not running the way I want.
      The code you posted looks valid. You need to help others help you.

      If you have access to your server logs, please post the error.

      If not, add the following: use CGI::Carp 'fatalsToBrowser'; after the shebang but before any other lines in your script and post the error shown.

      You should probably read Troubleshooting Perl CGI scripts as well.

        It's like I said, I'm not getting any errors. It guest won't detect the cookies if (defined($cgi->cookie('name'))) Doesn't work. I keep get 500 internal server errors, and O don't have access to server logs