Here's my dillema:
I have a form based login page (index.php):
<form action="login_action.php?login=check" method="post>
it hits login_action.php to check for a valid username/password. No big deal.
After it validates, I want to set a cookie and redirect the user back to index.php. Here is how I am trying (and failing) to do it now:
setcookie ('userID',$user['ID'],time()+3600);
header ("location: index.php?login=success&begin=true");
The cookie is set, but it does not redirect. What would be the correct way of doing what I am trying to accomplish?
Thanks in advance,
Brian