IE9 not playing well with php
Greetings!!
I have built a search engine using data bridge it works perfectly in Firefox Chrome and in Safari but thanks to good old IE it stops working in version 9. when the query is sent to page it refuses to filter the results via a search word like hat. It will show all results here is my code for the search bar and for the reciving php code
<?php require_once('Connections/acme.php.inc'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; // removes magic quotes
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); //this is the filter for all bad code injection
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;
}
}
mysql_select_db($database_acme, $acme);
$query_Recordset1 = "SELECT * FROM project";
$Recordset1 = mysql_query($query_Recordset1, $acme) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<?php require_once("webassist/form_validations/wavt_validatedform_php.php"); ?>
and for the reciving page
<?php require_once('Connections/acme.php.inc'); ?>
<?php require_once("webassist/database_management/wada_search.php"); ?>
<?php
//WA Database Search (Copyright 2005, WebAssist.com)
//Recordset: WADAproject;
//Searchpage: project_search-test.php;
//Form: WADASearchForm;
$WADbSearch1_DefaultWhere = "";
if (!session_id()) session_start();
if (isset($_GET["Search"]) || isset($_GET["Search_x"])) {
$WADbSearch1 = new FilterDef;
$WADbSearch1->initializeQueryBuilder("MYSQL","1");
//keyword array declarations
//comparison list additions
$WADbSearch1->addComparisonFromEdit("searchWords","searchWords","AND","Includes",0);
//save the query in a session variable
if (1 == 1) {
$_SESSION["WADbSearch1_project_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_project_resultstest"]) && $_SESSION["WADbSearch1_project_resultstest"] != "") {
$WADbSearch1->whereClause = $_SESSION["WADbSearch1_project_resultstest"];
}
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;
}
}
?>
<?php
$currentPage = $_SERVER["PHP_SELF"];
?>
<?php
$maxRows_WADAproject = 10;
$pageNum_WADAproject = 0;
if (isset($_GET['pageNum_WADAproject'])) {
$pageNum_WADAproject = $_GET['pageNum_WADAproject'];
}
$startRow_WADAproject = $pageNum_WADAproject * $maxRows_WADAproject;
mysql_select_db($database_acme, $acme);
$query_WADAproject = "SELECT * FROM project";
setQueryBuilderSource($query_WADAproject,$WADbSearch1,false);
$query_limit_WADAproject = sprintf("%s LIMIT %d, %d", $query_WADAproject, $startRow_WADAproject, $maxRows_WADAproject);
$WADAproject = mysql_query($query_limit_WADAproject, $acme) or die(mysql_error());
$row_WADAproject = mysql_fetch_assoc($WADAproject);
if (isset($_GET['totalRows_WADAproject'])) {
$totalRows_WADAproject = $_GET['totalRows_WADAproject'];
} else {
$all_WADAproject = mysql_query($query_WADAproject, $acme);
$totalRows_WADAproject = mysql_num_rows($all_WADAproject);
}
$totalPages_WADAproject = ceil($totalRows_WADAproject/$maxRows_WADAproject)-1;
?>
<?php
$queryString_WADAproject = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_WADAproject") == false &&
stristr($param, "totalRows_WADAproject") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_WADAproject = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_WADAproject = sprintf("&totalRows_WADAproject=%d%s", $totalRows_WADAproject, $queryString_WADAproject);
?>
<?php
// RepeatSelectionCounter_1 Initialization
$RepeatSelectionCounter_1 = 0;
$RepeatSelectionCounterBasedLooping_1 = false;
$RepeatSelectionCounter_1_Iterations = "3";
?>
as a side note when I was building this I set the search bar to equal not to include.
thanks in advanced