Location: PHPKode > scripts > phpRetrieve > phpRetrieve/getCriteria.php
<?php
session_start();

	$fieldCount = $_POST['fieldcount'];
	$do = $_POST['do'];
	$i = 1; $arr = array();
	while($i <= $fieldCount){
		$fieldName = $_POST[$i.'_field'];
		$arr[$fieldName]['Name'] = $fieldName;
		$arr[$fieldName]['Select'] = "no";
		if(isset($_POST[$i.'_include'])){ $arr[$fieldName]['Select'] = $_POST[$i.'_include']; }
		$arr[$fieldName]['Condition'] = $_POST[$i.'_condition'];
		$arr[$fieldName]['Val1'] = $_POST[$i.'_Val1'];
		$arr[$fieldName]['Val2'] = $_POST[$i.'_Val2'];
		$i++;
	}

	//print_r($arr);
	
	
	$_SESSION['session_Criteria'] = $arr;
	if($do == "Run"){
		header('Location: index.php?view=Run'); exit;
	}
	if($do == "SQL"){
		header('Location: index.php?view=SQL'); exit;
	}
	if($do == "Save"){
		header('Location: index.php?view=Save'); exit;
	}
	
?>
Return current item: phpRetrieve