Here is my problem.
I am trying to write a simple, yet secure, admin section for a website. I have looked at the User Auth library in the articles section and it was a lot of help but I am running into a problem.
I have a function that looks in a database checks a username and password and sets session cookies for that user. Once that is done I want the browser to redirect to the protected section so I try to set a header("Location: blah blah") but the html header is already sent with the cookie. I cant call the header statement before setcookie or else the cookies wont be sent. I have thought about setting the cookie in the main page of the admin section but I can't find a way to make it secure. Please HELP!
Thanks,
Adam