The action for my search page points to a results page...
action="results.php"
Here is the code for my results page (please be patient as I am not a php guy...I am a CFer)
<?php require_once('Connections/wenzelscustomers.php'); ?>
<?php
//WA Database Search Include
require_once("WADbSearch/HelperPHP.php");
?>
<?php
//WA Database Search (Copyright 2005, WebAssist.com)
//Recordset: rsCustomers;
//Searchpage: customersearch.php;
//Form: customersearch;
$WADbSearch1_DefaultWhere = "0=0";
if (!session_id()) session_start();
if ((isset($_POST["WADbSearch1"])) && ($_POST["WADbSearch1"] != "")) {
$WADbSearch1 = new FilterDef;
$WADbSearch1->initializeQueryBuilder("MYSQL","1");
//keyword array declarations
$KeyArr1 = array("ZIP");
//comparison list additions
$WADbSearch1->keywordComparison($KeyArr1,"".((isset($_POST["zip"]))?$_POST["zip"]:"") ."","AND","=",",%20","%20","%22","%22",0);
//save the query in a session variable
if (1 == 1) {
$_SESSION["WADbSearch1_results"]=$WADbSearch1->whereClause;
}
}
else {
$WADbSearch1 = new FilterDef;
$WADbSearch1->initializeQueryBuilder("MYSQL","1");
//get the filter definition from a session variable
if (1 == 1) {
if (isset($_SESSION["WADbSearch1_results"]) && $_SESSION["WADbSearch1_results"] != "") {
$WADbSearch1->whereClause = $_SESSION["WADbSearch1_results"];
}
else {
$WADbSearch1->whereClause = $WADbSearch1_DefaultWhere;
}
}
else {
$WADbSearch1->whereClause = $WADbSearch1_DefaultWhere;
}
}
$WADbSearch1->whereClause = str_replace("\\''", "''", $WADbSearch1->whereClause);
$WADbSearch1whereClause = '';
?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$maxRows_rsCustomers = 15;
$pageNum_rsCustomers = 0;
if (isset($_GET['pageNum_rsCustomers'])) {
$pageNum_rsCustomers = $_GET['pageNum_rsCustomers'];
}
$startRow_rsCustomers = $pageNum_rsCustomers * $maxRows_rsCustomers;
mysql_select_db($database_wenzelscustomers, $wenzelscustomers);
$query_rsCustomers = "SELECT * FROM CUSTOMERS";
setQueryBuilderSource($query_rsCustomers,$WADbSearch1,false);
$query_limit_rsCustomers = sprintf("%s LIMIT %d, %d", $query_rsCustomers, $startRow_rsCustomers, $maxRows_rsCustomers);
$rsCustomers = mysql_query($query_limit_rsCustomers, $wenzelscustomers) or die(mysql_error());
$row_rsCustomers = mysql_fetch_assoc($rsCustomers);
if (isset($_GET['totalRows_rsCustomers'])) {
$totalRows_rsCustomers = $_GET['totalRows_rsCustomers'];
} else {
$all_rsCustomers = mysql_query($query_rsCustomers);
$totalRows_rsCustomers = mysql_num_rows($all_rsCustomers);
}
$totalPages_rsCustomers = ceil($totalRows_rsCustomers/$maxRows_rsCustomers)-1;
?>
<?php
// RepeatSelectionCounter_1 Initialization
$RepeatSelectionCounter_1 = 0;
$RepeatSelectionCounterBasedLooping_1 = false;
$RepeatSelectionCounter_1_Iterations = "3";
?>


