Entry
How to redirect to 4 different pages based on 4 "userlevel" from MySQL ? "id" is passed. URGENT !!
Apr 10th, 2004 08:08
Matt Chatterley, Biju Kaimal,
As long as you want to redirect at the beginning of a script (before ANY
text or HTML headers are sent), you can use the header() function to
send a string such as: header("Location: http://redirect.to.here/page1.php")
This means, if you retrieve your userlevel from MySQL (presumably
obtained via a query supplying id as a parameter), you can perform
multiple if() or better one switch() operation on it, outputting the
appropriate page to redirect to via header().