So I'd like to have a php program direct a user to different pages based on certain criteria. So:
If ($user = $admin){ //direct to admin.php; }else{ //direct to default.php }
Etc...
<?php header("Location: http://www.yourwebsite.com/"); ?>
But remeber that header must always be sent first so I suggest you use ob_start() at the begining of the code and ob_end_flush() at the end of the code
Right, but I can't determine what location the header should reference until the PHP script executes, but a header must be sent before. What am I missing?