function redirect($location, $script = false) { if (!$script) { header("Location: ".str_replace("&", "&", $location)); exit; } else { echo "\n"; exit; } }