Help with search
Hi Jason, here is the code for the search page for the date range. Can you tell me what I need to do to get this functional? This page has 2 text fields and a submit button. 
thanks
Robert
<?php
//WA Database Search Include
require_once("WADbSearch/HelperPHP.php");
?>
<?php
//WA Database Search (Copyright 2005, WebAssist.com)
//Recordset: Recordset1;
//Searchpage: searchagain.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
  $KeyArr0 = array("id", "last_name", "first_name", "primary_email", "secondary_email", "city", "county", "state_us", "province_ca", "country", "event_country", "event_state_us", "event_province_ca", "event_city", "event_county", "short_description", "long_description", "_shape");
  //comparison list additions
  $WADbSearch1->keywordComparison($KeyArr0,"".((isset($_POST["search"]))?$_POST["search"]:"")  ."","AND","Includes",",%20","%20","%22","%22",0);
  //save the query in a session variable
  if (1 == 1) {
    $_SESSION["WADbSearch1_searchagain"]=$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_searchagain"]) && $_SESSION["WADbSearch1_searchagain"] != "")     {
      $WADbSearch1->whereClause = $_SESSION["WADbSearch1_searchagain"];
    }
    else     {
      $WADbSearch1->whereClause = $WADbSearch1_DefaultWhere;
    }
  }
  else     {
    $WADbSearch1->whereClause = $WADbSearch1_DefaultWhere;
  }
}
$WADbSearch1->whereClause = str_replace("\\''", "''", $WADbSearch1->whereClause);
$WADbSearch1whereClause = '';
?>
<?php require_once('Connections/connNids.php'); ?>
<?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;
}
}
?>
<?php
mysql_select_db($database_connNids, $connNids);
$query_Recordset1 = "SELECT * FROM Report";
setQueryBuilderSource($query_Recordset1,$WADbSearch1,false);
$Recordset1 = mysql_query($query_Recordset1, $connNids) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="mystyles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" name="form1" method="post" action="searchagain.php">
  <p> </p>
<p> </p>
  <p>
    <label>Between
      <input type="text" name="Between" id="Between" />
    </label>
   
  <label>And
    <input type="text" name="And" id="And" />
  </label>
  </p>
  <p> 
     	
     	
     	
     	
     	
     	
     	
     	
     	
     	
     	
     	
     	
     	
     	
     	
     		
     	
      
      
      
      
     
    <label>
      <input type="submit" name="Submit2" id="Submit2" value="Submit" />
    </label>
    </p>
  <table cellpadding="2" cellspacing="0" border="0">
    <tr>
      <td align="center"><input type="hidden" name="WADbSearch1" value="Submit" /></td>
    </tr>
  </table>
</form>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>


