Search not working live
It is working on the remote server. The server has php 5 Has there been an issue with that?
Please advise.
Here is the code
<?php
//WA Database Search Include
require_once("../WADbSearch/HelperPHP.php");
?>
<?php
//WA Database Search (Copyright 2005, WebAssist.com)
//Recordset: WADAusers;
//Searchpage: users_Search.php;
//Form: WADASearchForm;
$WADbSearch1_DefaultWhere = "";
if (!session_id()) session_start();
if ((isset($_GET["Search_x"]) && $_GET["Search_x"] != "")) {
$WADbSearch1 = new FilterDef;
$WADbSearch1->initializeQueryBuilder("MYSQL","1");
//keyword array declarations
//comparison list additions
$WADbSearch1->addComparisonFromEdit("UserFirstName","S_UserFirstName","AND","Begins With",0);
$WADbSearch1->addComparisonFromEdit("UserLastName","S_UserLastName","AND","Begins With",0);
$WADbSearch1->addComparisonFromEdit("UserCity","S_UserCity","AND","Begins With",0);
$WADbSearch1->addComparisonFromList("UserAccept","S_UserAccept","AND","=",0);
//save the query in a session variable
if (1 == 1) {
$_SESSION["WADbSearch1_users_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_users_Results"]) && $_SESSION["WADbSearch1_users_Results"] != "") {
$WADbSearch1->whereClause = $_SESSION["WADbSearch1_users_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;
}
}
?>
<form action="users_Results.php" method="get" name="WADASearchForm" id="WADASearchForm">
<div class="WADAHeader"></div>
<table border="0" align="center" cellpadding="0" cellspacing="0" class="WADADataTable">
<tr>
<td class="WADADataTableHeader">First Name:</td>
<td class="WADADataTableCell"><input type="text" name="S_UserFirstName" id="S_UserFirstName" value="" size="32" /></td>
</tr>
<tr>
<td class="WADADataTableHeader">Last Name:</td>
<td class="WADADataTableCell"><input type="text" name="S_UserLastName" id="S_UserLastName" value="" size="32" /></td>
</tr>
<tr>
<td class="WADADataTableHeader">City:</td>
<td class="WADADataTableCell"><input type="text" name="S_UserCity" id="S_UserCity" value="" size="32" /></td>
</tr>
<tr>
<th class="WADADataTableHeader"> </th>
<td class="WADADataTableCell"><select name="S_UserAccept" id="S_UserAccept">
<option value="1" selected="selected">Accepted</option>
<option value="2">Unaccepted</option>
</select>