Hey all, please help me.
This is part of whats on the results page of a search.
How do i make it so if they didnt do a search for a city it will query the database for whatever has a value? if you get my meaning.
and if i add more fields how do i make it so if certain choses are blank not to sure at all or search for either.
example in the database you have MALE or FEMALE. if you chose on the search page for either what would be the value.
Thank you for your help in advance
if (isset($_GET['advancesr'])||$_GET['advsrc']=="advancesr") {
$advsrc = "advancesr";
$query = "SELECT * FROM crib_users WHERE city='".$_GET['city']."'";
if ($_REQUEST['gender']=="Male") $query .= " AND gender='Male'";
if ($_REQUEST['gender']=="Female") $query .= " AND gender='Female'";
if ($_REQUEST['online']=="1") $query .= " AND online='1'";