* Thus wrote Jean-Christian IMbeault ([EMAIL PROTECTED]):
> Is the PHP constant SID always defined? I have found conflicting answer 
> in the documentation. One page of the docs says it is always defined 
> while another says it is defined only if the right cookie hasn't been 
> passed to the server.
> 
> Also how can I check if the SID is set or not?
> 
> I have tried the following but get an error:
> 
> <?php
> if (isset(SID)) {}
> ?>
> Parse error: parse error, expecting `T_VARIABLE' or `'$''

SID is a constant, only variables can be tested with isset().
  http://php.net/isset

What you want is defined()
  http://php.net/defined

ie:
if (defined('SID')) {}




Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to