PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
grudz
Forum Commoner
Posts: 68 Joined: Thu Dec 04, 2003 12:52 pm
Post
by grudz » Thu Mar 25, 2004 12:23 pm
how would the that if statement
Code: Select all
if ($_SERVER['HTTP_REFERER'] == "%DESC%");
Farrier
Forum Newbie
Posts: 12 Joined: Thu Mar 25, 2004 10:39 am
Post
by Farrier » Thu Mar 25, 2004 12:47 pm
if (strpos($_SERVER['HTTP_REFERER'], 'DESC') !== false) {
// Note we must test exactly against false here.
Use stripos() if you want a case-insensitive match.
grudz
Forum Commoner
Posts: 68 Joined: Thu Dec 04, 2003 12:52 pm
Post
by grudz » Thu Mar 25, 2004 1:16 pm
it gives me a parse error
TheBentinel.com
Forum Contributor
Posts: 282 Joined: Wed Mar 10, 2004 1:52 pm
Location: Columbus, Ohio
Post
by TheBentinel.com » Thu Mar 25, 2004 1:34 pm
Code: Select all
<?php
if (strpos($_SERVER['HTTP_REFERER'], 'DESC') !== false)
{
echo "not false";
}
else
{
echo "is false";
}
?>
Does that error if you use it just that way? I didn't test it, but it looks right.