php location

1Tsme1941

Member
I want to go to a different page depending on different if results but don't
know the correct syntax;as in:

if (count == 1)
{ echo 'look at these cars';}

go to page1.php


elseif (count == 2)
{ echo 'look at these cars';}

go to page2.php
 

Cromewell

Administrator
Staff member
Like just redirect to the correct page? As long as no content has been sent yet you can use header("location: page2.php");
 
Top