Hi Jason,
Okay I have a search form in place and a results page. Here is the Results code:
<?php
if($_SERVER["REQUEST_METHOD"] == "POST") {
foreach($_POST as $key => $val) {
if(is_array($_POST[$key])) $_POST[$key] = implode(" ", $_POST[$key]);
}
}
?>
<?php require_once('Connections/connBLUR.php'); ?>
<?php
//WA Database Search Include
require_once("WADbSearch/HelperPHP.php");
?>
<?php
//WA Database Search (Copyright 2005, WebAssist.com)
//Recordset: rsProp;
//Searchpage: 0test.php;
//Form: form1;
$WADbSearch1_DefaultWhere = "";
if (!session_id()) session_start();
if ((isset($_POST["WADbSearch1"])) && ($_POST["WADbSearch1"] != "")) {
$WADbSearch1 = new FilterDef;
$WADbSearch1->initializeQueryBuilder("MYSQL","1");
//keyword array declarations
$KeyArr1 = array("Country");
//comparison list additions
$WADbSearch1->keywordComparison($KeyArr1,"".$row_rsProp['Country'] ."","AND","=","%20AND%20","%20OR%20","%22","%22",0);
//save the query in a session variable
if (1 == 1) {
$_SESSION["WADbSearch1_resultsTEST"]=$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_resultsTEST"]) && $_SESSION["WADbSearch1_resultsTEST"] != "") {
$WADbSearch1->whereClause = $_SESSION["WADbSearch1_resultsTEST"];
}
else {
$WADbSearch1->whereClause = $WADbSearch1_DefaultWhere;
}
}
else {
$WADbSearch1->whereClause = $WADbSearch1_DefaultWhere;
}
}
$WADbSearch1->whereClause = str_replace("\\''", "''", $WADbSearch1->whereClause);
$WADbSearch1whereClause = '';
?>
Here is the search form:
<form name="form1" action="resultsTEST.php" method="post">
<table cellpadding="2" cellspacing="0" border="0">
<tr>
<td width="37" align="right"><label for="Country">Select</label></td>
<td width="200"><input type="checkbox" name="Country[]" value="" />
Any
<input type="checkbox" name="Country[]" value="France" />
France
<input type="checkbox" name="Country[]" value="Italy" />
Italy</td>
</tr>
<tr>
<td align="center" colspan="2"><p>
<input type="submit" name="WADbSearch1" value="Submit" />
</p>
<p>test </p></td>
</tr>
</table>
</form>
What I am not sure about on the search parameter is what the VALUE should be after the Type.
Thx
Eric