hi all! i've a weird problem..
it appears that my $_GET variables still exists after a header("location redirect.. here's the code..
function go_home() {
$url = BASEURL; // i defined based URL to be http://www.domain.com/u.php
session_write_close();
header("Location: ".$url);
exit;
}
function closestuff($sid) {
// do mysql query here before redirecting to a plain /u.php address
go_home();
}
if ($_GET['action'] == "closestuff") {
closestuff($_GET['sid']);
}
i first check when action == closestuff, i perform some mysql functions, and redirect to a blank u.php. However, it appears that when it arrives at u.php, the action == closestuff is called again, and the closestuff() function is ran twice before it stops.
i've never seen this before, and it's really puzzling me! anybody has any idea? any help is appreciated! thanks!