Re: strpos error (I'm missing something obvious)

From: Date: Mon, 01 Oct 2007 21:36:41 +0000
Subject: Re: strpos error (I'm missing something obvious)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-262623@lists.php.net to get a copy of this message
I fixed this by changing === TRUE to !== FALSE, so I think I am good to go now. But would still like to know why TRUE doesn't work. Thanks. -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada College www.wnc.edu 775-445-3326 P.S. Please note that my e-mail and website address have changed from wncc.edu to wnc.edu. On Oct 1, 2007, at 2:23 PM, Kevin Murphy wrote: > Overly simplified version of my code. > > $site = "http://www.wnc.edu"; > $referer = $_SERVER["HTTP_REFERER"]; > > echo $referer; // the output is correct at: http://www.wnc.edu/test/ > > if (strpos($referer,$site) === TRUE) > { > echo "yes"; > } > > Why doesn't it echo out "yes"? I know I am doing something stupid > here, but it doesn't seem to work .... :-) > > > -- > Kevin Murphy > Webmaster: Information and Marketing Services > Western Nevada College > www.wnc.edu > 775-445-3326 > > P.S. Please note that my e-mail and website address have changed > from wncc.edu to wnc.edu. > >

« previous php.general (#262623) next »