I've got everything working except for one piece. I'm trying to authenticat users against a mySQL database and then once they are authenticated I'm trying to create a session that's the same as their username. Once the session is established I want to redirect them to another page that requires the session to be established. However I get everything except for the redirection to work.
At this point I have already authenticated them by finding a row in the database with the username and password they entered through a form. Now I want to establish a session with their authenticated username. Here is where the code is failing. if ($myrow = mysql_fetch_array($result)) { //if there is a row in the database then the user //must have submitted the username and matching password session_start(); session_register($username); header ("Location: ./myinfo.php"); //THIS IS NOT WORKING!!!!! //exit; /* I tried with and without the exit. If I do without the exit nothing happens and the below is not shown on the screen. When I try it with the exit the below is shown and I'm still not redirected. */ //echo "<b><i>We have located you in the database!</b><p>"; } else {echo "<b><i>No Records Found!</b><p>";} //Show login again Any tips, ideas, or suggestions would be greatly appreciated. Thanks, Curt www.killerpigs.com www.scdservices.com www.angryland.com Get your Free E-mail at http://scdservices.com ____________________________________________________________ Get your own FREE Web and POP E-mail Service in 14 languages at http://www.zzn.com. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]