$value ) $$key = $value; foreach( $_GET as $key => $value ) $$key = $value; foreach( $_COOKIE as $key => $value ) $$key = $value; function numbersonly($string) { $pattern = '/[^0-9]/'; return preg_replace($pattern, '', $string); } $id = numbersonly($id); header ('HTTP/1.1 301 Moved Permanently'); header ("Location: /"); ?>