|
|
|
|
|
if($_REQUEST[org]){
$qry = "SELECT * FROM school WHERE org='$_REQUEST[org]'";
if($_REQUEST[town]) {
$qry .= " AND town_no=\"$_REQUEST[town]\"";
} else if($_REQUEST[city]) {
$qry .= " AND city_no=\"$_REQUEST[city]\"";
} else if($_REQUEST[state]) {
$qry .= " AND state_no=\"$_REQUEST[state]\"";
} else if($_REQUEST[country]) {
$qry .= " AND country_no=\"$_REQUEST[country]\"";
}
if($_REQUEST[name]) {
$formatted_name = strtoupper($_REQUEST[name]);
$name_array = explode(" ",$formatted_name);
$qry .= " AND ( ";
for($na=0;$na= $total)
$limit=$total;
$scale1 = $limit - $cline;
$qry = $qry." LIMIT $cline,$scale1;";
$result = mysqli_query($connect, $qry,$connect);
?>
Search Results |
if(!$total) {
echo("
No Schools Found |
");
} else {
for($s=0;$row = mysqli_fetch_array($result);$s++) {
$mem_qry = mysqli_query($connect, "SELECT COUNT(*) FROM my_school WHERE s_no=$row[s_no]",$connect);
$mem_tot = mysql_result($mem_qry,0,0);
if($row[org] == 'pr') {
$org_txt = "Primary School";
} else if($row[org] == 'inter') {
$org_txt = "Intermediate";
} else if($row[org] == 'col') {
$org_txt = "College";
} else if($row[org] == 'ter') {
$org_txt = "Teriary School";
} else if($row[org] == 'post') {
$org_txt = "Post Graduate";
} else if($row[org] == 'work') {
$org_txt = "Workplace";
} else if($row[org] == 'club') {
$org_txt = "Club";
}
if($row[location]) {
$lo_row = select_qry('local_area','no',$row[location],$connect);
$location_txt = $lo_row['city_name'];
if($lo_row['town_name']) {
$location_txt .= "-".$lo_row['town_name'];
}
}
if(fmod($s,2) == 0 ) {
$bgcolor = "#FFFFFF";
} else {
$bgcolor = "#F5F5F5";
}
?>
|
}
?>
|
$url = "$_SERVER['PHP_SELF']?country=$country&state=$state&city=$city&town=$town&org=$org&name=$name";
if($total) page_avg1($totalpage,$cpage,$url);
?>
|
}
?>
|
|
}
?>
|
|
|
|
![](../images/option_bk4.gif) |
|