$pid = $_GET['pid']; if ($pid == null) header("Location: ./shop/shop.php"); else header("Location: ./shop/shop.php?pid=$pid"); ?>