search results displaying all records, please help
i did post this before but didnt have any luck I have used my search script before but tried it again and it is returning ALL the results from the DB..Can anyone see what i am missing?
$var_SalaryReq_Recordset1 = "%";
if (isset($_GET['SalaryReq'])) {
$var_SalaryReq_Recordset1 = $_GET['SalaryReq'];
}
$var_skills_offered_Recordset1 = "%";
if (isset($_GET['skills_offered'])) {
$var_skills_offered_Recordset1 = $_GET['skills_offered'];
}
$var_location_Recordset1 = "%";
if (isset($_GET['location'])) {
$var_location_Recordset1 = $_GET['location'];
}
$var_PositionReq_Recordset1 = "%";
if (isset($_GET['PositionReg'])) {
$var_PositionReq_Recordset1 = $_GET['PositionReg'];
}
mysql_select_db($database_hostprop, $hostprop);
$query_Recordset1 = sprintf("SELECT userid, FirstName, Surname, SalaryReq, PositionReq, location, otherComments, skills_offered FROM think_signup WHERE SalaryReq LIKE %s OR PositionReq LIKE %s OR location LIKE %s OR skills_offered LIKE %s", GetSQLValueString("%" . $var_SalaryReq_Recordset1 . "%", "text"),GetSQLValueString("%" . $var_PositionReq_Recordset1 . "%", "text"),GetSQLValueString("%" . $var_location_Recordset1 . "%", "text"),GetSQLValueString("%" . $var_skills_offered_Recordset1, "text"));
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $hostprop) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
the search feilds are
<input name="PositionReq" type="text" class="textfeilds" value="Job Title" size="32" />
<input name="skills_offered" type="text" class="textfeilds" value="Skills Required" size="32" />
<input name="SalaryReq" type="text" class="textfeilds" value="Salary Offered" size="32" />
<input name="location" type="text" class="textfeilds" value="Location" size="32" />
thanks in advance
