PHP Redirect doesn't work - UPDATE: Safety of @extract($_POST);
EDIT: Scroll down for a follow up problem related to the safety of @extract($_POST);
Hi all,
I set up a php redirect resulting from two dropdown select menus. Here is the code:
Code:
<?php
@extract($_POST);
$quickarchive_date = stripslashes($quickarchive_date);
$quickarchive_categories = stripslashes($quickarchive_categories);
if ( $quickarchive_categories == "C" && $quickarchive_date == "#" ) {
$url = "http://www.mysite.com/weblog/archive_2/";
} elseif ( $quickarchive_categories != "C" && $quickarchive_date == "#" ) {
$url = "http://www.mysite.com/weblog/archive_2/".$quickarchive_categories."/" ;
} else {
$url = "http://www.mysite.com/weblog/archive_2/".$quickarchive_categories."/".$quickarchive_date ;
}
header("HTTP/1.1 301 Moved Permanently");
header("Location: $url");
?>
This doesn't work. What do I have to change in order to make it work and keep the same functionality.
Thanks, dl33