you have to send the cookies before you send the first part of html output of a pgae, but not before the scipr itself starts, you can already do some test
to give you the general idea
she visits the site
check if admin cookie is set
not set: redirect to login page
if login is correct set cookie and afterwards redirect to the admin index page
it's not hard, believe me
|