if ($_POST['search']) {
$rarray = array($relation,$friend,$online,$activity);
$relationship = implode(",", $rarray);
$con = mysql_connect("localhost","p","") or die(mysql_error());
$db = mysql_select_db("pinehead",$con) or die(mysql_error());
$sql = " SELECT * FROM users WHERE (age > $agemin) AND (age < $agemax) AND city like '%$city%' limit 0,5";
$result = mysql_query($sql,$con) or die(mysql_error());
while ($row = mysql_fetch_array($result)) {
}
$name = $row['fname'];
echo "A search has been performed";
echo $name;
echo $sql;
}
Ok, i know i have feilds in the sql table that match the search criteira i search for. However it will never echo any results.
Any ideas
This is my code, thank you.
Anthony