Basically what I'm trying to do is make it so that the colomn filter is changeable from a drop down menu as well as the actual search text. Both are in a GET form with a submit button. It's recieiving the url variables but it won't let me change both filter and search, it only works with one or the other. It doesn't show any data at all, just the empty table.
It makes more sense if you look at the code.
<?php require_once('Connections/zero.php'); ?>
<?php
$maxRows_Recordset1 = 9999;
$pageNum_Recordset1 = 0;
if (isset($_GET['pageNum_Recordset1'])) {
$pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
}
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;
$colname_Recordset1 = "-1";
if (isset($_GET['search'])) {
$colname_Recordset1 = (get_magic_quotes_gpc()) ? $_GET['search'] : addslashes($_GET['search']);
}
$filter_Recordset1 = "-1";
if (isset($_GET['filter'])) {
$filter_Recordset1 = (get_magic_quotes_gpc()) ? $_GET['filter'] : addslashes($_GET['filter']);
}
mysql_select_db($database_zero, $zero);
$query_Recordset1 = sprintf("SELECT * FROM animals WHERE 'filter' = 'search' ORDER BY name ASC", $filter_Recordset1,$colname_Recordset1);
$Recordset1 = mysql_query($query_Recordset1, $zero) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>