>I've got the login part working perfectly, and I can turn the URL into a >link on the page, but I'd rather have the script just automatically forward >the person to the page they're login gives them access to. > >I've tried using header(), but since the redirection takes place about >mid-script, it doesn't work. I've also tried using <meta> tag redirects, >but those don't seem to accept the PHP/MySQL combo.
Choice 1. Re-structure your HTML/PHP so that the user registration and the department lookup *IS* at the top of the script. It's logically impossible for this to be "impossible" -- You have all the inputs at the top of the page that you do half-way down. Your code will probably end up being more maintainable once you separate this login logic from the rest of your page anyway. Choice 2. The META tags *SHOULD* work, and they should not give a [bleep] about the PHP/MySQL part of it. But they also *MUST* be in the HEAD tag for it to work reliably on most/all browsers. Show us the parts of your code where you think the META tags care about PHP/MySQL. Choice 3. Don't re-direct at all. Use include. <?php switch($department){ case 'Accounting': case 'Programming': include "$department.inc"; break; default: # Error. Either you are missing a Department file, or somebody's trying to fool your server into serving up a file you don't want them to see break; } ?> -- Like Music? http://l-i-e.com/artists.htm I'm looking for a PRO QUALITY two-input sound card supported by Linux (any major distro). Need to record live events (mixed already) to stereo CD-quality. Soundcard Recommendations? Software to handle the recording? Don't need fancy mixer stuff. Zero (0) post-production time. Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo audio-to-disk. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php