Hey, thank you for the response. Maybe I wasn't clear in phrasing my question...
I understand perfectly well how headers work. I'm looking for more of a strategic response, such as a method for authenticating users with a form-based approach (as opposed to Apache digest or something) that allows me to send the user to another page once authenticated.
If one has a form on a login page, and it uses XHTML-1.0-compliant code, headers have already been sent. Agreed? So using PHP, how would one go about redirecting a user upon successful authentication without having the form action be set to another page? Is it possible?
Right now, my form action is set to $_SERVER['PHP_SELF']. The reason is so that I can display a "bad username/password" message on the login page, instead of displaying it on an ugly, white, subsequent page and forcing the user to click back. I'm running into the headers problem when I attempt to send the user to the "Congrats, you're logged in" page, for obvious reasons.
Just wondering how PHP programmers normally deal with this situation, because I see this type of login page on a lot of sites.
Thanks!