session_start(); include_once 'functions.php'; if(isset($_GET['clear'])){ setcookie("config","", time() + (86400*30), "/"); $_SESSION['config']['error']='
Clear Success
'; }else{ $errorcheck=FALSE; $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.='Save Success
'; }else{ $_SESSION['config']['error']=$error; } } header("Location: /../config.php"); exit(); ?>