kev wood Posted June 3, 2008 Share Posted June 3, 2008 is it possible to get the if else statement to load a page on the else condition. i have spent a couple of hours looking around and al the examples i can find just use the echo function to get it to print something out on the screen. i want it to be able to redirect the user. a link to a good tutorial of example code would be great. Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted June 3, 2008 Share Posted June 3, 2008 Of course: <?php if($condition===true){ header("location:true.php"); }else{ header("location:false.php"); } ?> You should note that you cannot send any output to the browser prior to changing location like this. Quote Link to comment Share on other sites More sharing options...
kev wood Posted June 3, 2008 Author Share Posted June 3, 2008 thanks for the reply. i will not need to send any output the page they are redirected to will just tell the user they have reached there daily limit. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.