[thelist] php $_SESSION

shawn allen shawn at alterior.net
Wed Oct 16 17:12:01 CDT 2002


quoth Gary Bland:
> if (!isset($_SESSION['SESSION_UNAME'] == $user)){

isset() (actuallly a PHP language construct, not a function) requires a
variable as an argument, not an expression. I don't really get that line
of code, though... Shouldn't it just be:

if ($_SESSION['SESSION_UNAME'] != $user) {

It could be that you accidentally deleted a portion of that line, too. I
know I did that a couple times when I was learning how to use vim ;)

If/when in doubt: <http://php.net/isset>.

--
shawn allen
  e: shawn at alterior.net
  p: 415 577 3961
  im: shawnpallen



More information about the thelist mailing list