Dear steve:
i have something sound like what you are looking for, but i do it with postgres, like what Mamil say, it use header to set what pages to go. what i do is frist check the password, then i check the status of the user, if he/she is a student then i direct he/she to student web pages, else if he/she is a lecturer, then i direct he/she to lecturer homopages.
the way to do the drive them is:
header(location: your.web.address.here );
ok, i think you have understand what i mean, if you want my code, just send me a mail.
ahchew1413@hotmail.com
your also can mail me your code and link, i make it done for you...
ahchew1413