close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Creating a Search Form using Check boxes

Thread began 12/09/2009 11:30 am by karen.marley367377 | Last modified 12/22/2009 12:58 pm by karen.marley367377 | 1912 views | 10 replies


Check Boxes - When single ones selected works fine but not when multiple selected

Have resolved my last reply issue, but now have another one! X

Have created multiple check boxes to look at one field in the main table recordset.

When each selected singularly the check boxes show the correct results. The problem is when more than one check box is ticked. I am using the DATA Assist Search Server Behaviour and the code is posted below:

//WA Database Search (Copyright 2005,
//Recordset: WADAproperties;
//Searchpage: properties_Search.php;
//Form: WADASearchForm;
$WADbSearch1_DefaultWhere = "";
if (!session_id()) session_start();
if ((((isset($_GET["submit"]))?$_GET["submit"]:"") != "")) {
$WADbSearch1 = new FilterDef;
//keyword array declarations
$KeyArr1 = array("PropertyType");

//comparison list additions
$WADbSearch1->keywordComparison($KeyArr1,"".((isset($_GET["Industrial"]))?$_GET["Industrial"]:"") ."","AND","Includes",",%20","%20","%22","%22",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) {
else {
$WADbSearch1 = new FilterDef;
//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 = '';

Can you see where the problem lies ?

Many thanks

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...