Clear Success

'; }else{ $errorcheck=FALSE; $error='
'; if(preg_match('/^\d{5}$/', $_POST['Location1']) || empty($_POST['Location1'])){ if($_POST['Location1']!==NULL && $_POST['Location1'] !=="" && !empty($_POST['Location1'])){ if(ZipCheck($_POST['Location1'])=='BAD'){$error.="

Location 1 Zip does not validate

";$errorcheck=TRUE;} } }else{ $error.="

Location 1 must be in ZIP format

"; $errorcheck=TRUE; } if(preg_match('/^\d{5}$/', $_POST['Location2']) || empty($_POST['Location2'])){ if($_POST['Location2']!==NULL && $_POST['Location2'] !=="" && !empty($_POST['Location2'])){ if(ZipCheck($_POST['Location2'])=='BAD'){$error.="

Location 2 Zip does not validate

";$errorcheck=TRUE;} } }else{ $error.="

Location 2 must be in ZIP format

"; $errorcheck=TRUE; } if(preg_match('/^\d{5}$/', $_POST['Location3']) || empty($_POST['Location3'])){ if($_POST['Location3']!==NULL && $_POST['Location3'] !=="" && !empty($_POST['Location3'])){ if(ZipCheck($_POST['Location3'])=='BAD'){$error.="

Location 3 Zip does not validate

";$errorcheck=TRUE;} } }else{ $error.="

Location 3 must be in ZIP format

"; $errorcheck=TRUE; } $error.='
'; if($errorcheck===FALSE){ $jsonData = json_encode($_POST); setcookie("config", $jsonData, time() + (86400*30), "/"); $_SESSION['config']['error']='

Save Success

'; }else{ $_SESSION['config']['error']=$error; } } header("Location: /../config.php"); exit(); ?>