Sep 22, 2011 #1 keen01 MIS Nov 16, 2004 73 US I need to create a URL redirect that goes to one page if visitor number equals one else go to another page.
I need to create a URL redirect that goes to one page if visitor number equals one else go to another page.
Sep 22, 2011 #2 jpadie Technical User Nov 24, 2003 10,094 FR look in the manual for the ternary operator and the header() function Code: <?php $url = $visitorNumber == 1 ? 'somepage.php' : 'anotherpage.php'; header('Location: ' . $url); exit; ?> Upvote 0 Downvote
look in the manual for the ternary operator and the header() function Code: <?php $url = $visitorNumber == 1 ? 'somepage.php' : 'anotherpage.php'; header('Location: ' . $url); exit; ?>