remember to check before use
if(!isset($_GET["Var1"])){
header("Location: index.php?doc=error");
}
if(!isset($_GET["Var2"])){
header("Location: index.php?doc=error");
}
or another ways
$param = array("Var1", "Var2", "Var3");
for($i=0; $i<sizeof($param); $i++){
if(!isset($_GET[$param[$i]])){
header("Location: index.php?doc=error");
}
}