Form Using Multiple Check Boxes, Want initial page load to show All
Hi,
I have created a search form on the results page, using a couple of drop down lists and multiple check boxes.
Whe the page loads, or one of the drop down boxes is selected the page shows no results.
In order for results to show, one or more of the check boxes needs to be selected.
How can I have the initial page load to show all records, or have one of the drop lists show values without having to tick one of the check boxes?
The code from the page is as follows:
<?php
//WA Database Search (Copyright 2005, WebAssist.com)
//Recordset: WADAproperties;
//Searchpage: properties_Search.php;
//Form: WADASearchForm;
$WADbSearch1_DefaultWhere = "";
if (!session_id()) session_start();
if ((((isset($_GET["submit"]))?$_GET["submit"]:"") != "")) {
$WADbSearch1 = new FilterDef;
$WADbSearch1->initializeQueryBuilder("MYSQL","1");
//keyword array declarations
//comparison list additions
$WADbSearch1->addComparison("PropertyType","".((isset($_GET["Assembly"]))?$_GET["Assembly"]:"") ."","AND","=",0);
$WADbSearch1->addComparison("PropertyType","".((isset($_GET["HealthDay"]))?$_GET["HealthDay"]:"") ."","OR","Includes",0);
$WADbSearch1->addComparisonFromList("SaleORLease","status","AND","=",0);
$WADbSearch1->addComparisonFromEdit("RegionName","region","AND","Includes",0);
$WADbSearch1->addComparison("PropertyType","".((isset($_GET["Industrial"]))?$_GET["Industrial"]:"") ."","OR","Includes",0);
$WADbSearch1->addComparison("PropertyType","".((isset($_GET["Investment"]))?$_GET["Investment"]:"") ."","OR","Includes",0);
$WADbSearch1->addComparison("PropertyType","".((isset($_GET["Land"]))?$_GET["Land"]:"") ."","OR","Includes",0);
$WADbSearch1->addComparison("PropertyType","".((isset($_GET["Licenced"]))?$_GET["Licenced"]:"") ."","OR","Includes",0);
$WADbSearch1->addComparison("PropertyType","".((isset($_GET["Mixed"]))?$_GET["Mixed"]:"") ."","OR","Includes",0);
$WADbSearch1->addComparison("PropertyType","".((isset($_GET["Motor"]))?$_GET["Motor"]:"") ."","OR","Includes",0);
$WADbSearch1->addComparison("PropertyType","".((isset($_GET["Office"]))?$_GET["Office"]:"") ."","OR","Includes",0);
$WADbSearch1->addComparison("PropertyType","".((isset($_GET["Residential"]))?$_GET["Residential"]:"") ."","AND","Includes",0);
$WADbSearch1->addComparison("PropertyType","".((isset($_GET["Retail"]))?$_GET["Retail"]:"") ."","OR","Includes",0);
$WADbSearch1->addComparison("PropertyType","".((isset($_GET["Storage"]))?$_GET["Storage"]:"") ."","OR","Includes",0);
$WADbSearch1->addComparison("RegionName","".((isset($_GET["region"]))?$_GET["region"]:"") ."","AND","=",0);
$WADbSearch1->addComparison("SaleORLease","".((isset($_GET["status"]))?$_GET["status"]:"") ."","AND","=",0);
//save the query in a session variable
if (1 == 1) {
$_SESSION["WADbSearch1_properties_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_properties_Results"]) && $_SESSION["WADbSearch1_properties_Results"] != "") {
$WADbSearch1->whereClause = $_SESSION["WADbSearch1_properties_Results"];
}
else {
$WADbSearch1->whereClause = $WADbSearch1_DefaultWhere;
}
}
else {
$WADbSearch1->whereClause = $WADbSearch1_DefaultWhere;
}
}
$WADbSearch1->whereClause = str_replace("\\''", "''", $WADbSearch1->whereClause);
$WADbSearch1whereClause = '';
?>

type="radio"
to
type="checkbox"
