Well I tried that and variants of it but no luck. I really need Any to equal both Male and Female. Everything I've tried just returns 0 matches. I'm at my wits end with this stupid search thing and I'm now totally confused by it.
Here's what one part looks like:
[!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--]
$lookfor1_rsSearchads = \"1\";
if (isset($lookfor)) {
$lookfor1_rsSearchads = (get_magic_quotes_gpc()) ? $lookfor : addslashes($lookfor);
}
mysql_select_db($database_mysql, $mysql);
$query_rsSearchads = sprintf(\"SELECT users.`user`, userads.sex, users.age, userads.country, userads.county, userads.forwhat, userads.iam, userads.iam2, userads.hkids, userads.wkids, userads.iam3, userads.lookfor FROM userads, users WHERE userads.`user` = users.`user` AND users.age BETWEEN \'%s\' AND \'%s\' AND users.sex = \'%s\' ORDER BY age, users.age\", $colname1_rsSearchads,$colname2_rsSearchads,$lookfor1_rsSearchads);
$query_limit_rsSearchads = sprintf(\"%s LIMIT %d, %d\", $query_rsSearchads, $startRow_rsSearchads, $maxRows_rsSearchads);
$rsSearchads = mysql_query($query_limit_rsSearchads, $mysql) or die(mysql_error());
$row_rsSearchads = mysql_fetch_assoc($rsSearchads);[/span][!--PHP-Foot--][/div][!--PHP-EFoot--]
This part is another way I tried but got stuck with:
[!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--][span style=\"color:#0000BB\"]<?php
[/span][span style=\"color:#007700\"]if ([/span][span style=\"color:#0000BB\"]$HTTP_POST_VARS[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'lookfor\'[/span][span style=\"color:#007700\"]] == [/span][span style=\"color:#DD0000\"]\"Any\"[/span][span style=\"color:#007700\"])
{
[/span][span style=\"color:#0000BB\"]$lookfor [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#DD0000\"]\"\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#FF8000\"]//Tried everything I can think of but I get 0 matches
[/span][span style=\"color:#007700\"]}
elseif ([/span][span style=\"color:#0000BB\"]$HTTP_POST_VARS[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'lookfor\'[/span][span style=\"color:#007700\"]] == [/span][span style=\"color:#DD0000\"]\"Male\"[/span][span style=\"color:#007700\"])
{
[/span][span style=\"color:#0000BB\"]$lookfor [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#DD0000\"]\"Male\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#FF8000\"]// This works fine
[/span][span style=\"color:#007700\"]}
elseif ([/span][span style=\"color:#0000BB\"]$HTTP_POST_VARS[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'lookfor\'[/span][span style=\"color:#007700\"]] == [/span][span style=\"color:#DD0000\"]\"Female\"[/span][span style=\"color:#007700\"])
{
[/span][span style=\"color:#0000BB\"]$lookfor [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#DD0000\"]\"Female\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#FF8000\"]// This works fine
[/span][span style=\"color:#007700\"]}
[/span][span style=\"color:#0000BB\"]?>[/span]
[/span][!--PHP-Foot--][/div][!--PHP-EFoot--]
I'm just trying to find the way to go with this first one then I'll be able to apply the same for all the other fields.
Just so you know, the form itself is on a different page. I would buy a better book on php but I don't have the cash at the moment, so sorry to keep picking your brains. I only started learning php about 3 weeks ago.