This is almost embarassing, but… whatever. So, I’m developing this site, right, and it uses sessions for user validation. Now, the user has to have the option of logging out, so I just wrote a tiny script that’d do just that:
[code=php]$_SESSION = array();
session_destroy();
Hey, it works! But the problem is that after that is done, I want to redirect the user back to the main the page so that the session data is updated and the user can see he is logged out. Is there any way to accomplish this without the use of the header() function or HTML metas (’cause the script is included in the middle of the main page, not at the beginning)?