Forum Moderators: coopster
<?
$ref = strtoupper($_SERVER['HTTP_REFERER']);
if (strpos($ref,"EXAMPLE1") ¦¦ (strpos($ref,"EXAMPLE2")) {
echo "you're from ex";
} else {
echo "you're not from ex";
}
?>
On this line,
if (strpos($ref,"EXAMPLE1")) {
if I remove ¦¦ (strpos($ref,"EXAMPLE2"), it works fine. However, when I add that, I get
Parse error: syntax error, unexpected '{'
Thanks in advance for your help.
if (strpos($ref,"EXAMPLE1") ¦¦ (strpos($ref,"EXAMPLE2")) {
the first strpos has a bracket to its left to start the if enclosure.
the 2nd strpos also has one - but it plays no purpose and is not closed.
Either add another round bracket on the end of the if enclosure or remove the one immediately preceding the second strpos.
You get better at spotting these things with time :)