<form name="frmSearch" method="get" action="<?=$_SERVER['SCRIPT_NAME'];?>">
<table width="1000"cellspacing="0" cellpadding="0" align="center" border="0">
<tr>
<td ><div align="right">
<div class="no-print">Year :</div>
</div></td>
<td><div class="no-print">
<select name="txtKeyword">
<OPTION VALUE="" >--select--</OPTION>
<OPTION value="2012"<?if ($_GET["txtKeyword"]==2012) echo 'selected="selected"';?>>2012</OPTION>
<OPTION value="2013"<?if ($_GET["txtKeyword"]==2013) echo 'selected="selected"';?>>2013</OPTION>
<OPTION value="2014"<?if ($_GET["txtKeyword"]==2014) echo 'selected="selected"';?>>2014</OPTION>
<OPTION value="2015"<?if ($_GET["txtKeyword"]==2015) echo 'selected="selected"';?>>2015</OPTION>
<OPTION value="2016"<?if ($_GET["txtKeyword"]==2016) echo 'selected="selected"';?>>2016</OPTION>
<OPTION value="2017"<?if ($_GET["txtKeyword"]==2017) echo 'selected="selected"';?>>2017</OPTION>
<OPTION value="2018"<?if ($_GET["txtKeyword"]==2018) echo 'selected="selected"';?>>2018</OPTION>
<OPTION value="2019"<?if ($_GET["txtKeyword"]==2019) echo 'selected="selected"';?>>2019</OPTION>
<OPTION value="2020"<?if ($_GET["txtKeyword"]==2020) echo 'selected="selected"';?>>2020</OPTION>
<OPTION value="2021"<?if ($_GET["txtKeyword"]==2021) echo 'selected="selected"';?>>2021</OPTION>
<OPTION value="2022"<?if ($_GET["txtKeyword"]==2022) echo 'selected="selected"';?>>2022</OPTION>
</select>
<input type="submit" value="Search">
</div></td>
</tr>
</table>
</form>
<?
if($_GET["txtKeyword"] != "")
{$sumtotal_zone=0;
include("../../include/php/connect.php");
// Search By Name or Email
$strSQL= "SELECT DISTINCT f.zone_name
FROM student a,school b,class c,prefix d,province e,zone f
where
a.prefix_id=d.prefix_id and
a.school_id=b.school_id and
a.class_id=c.class_id and
b.province_id=e.province_id and
e.zone_id=f.zone_id and
a.year_id LIKE '%".$_GET["txtKeyword"]."%'
order by a.student_id desc ";
// $strSQL = "SELECT * FROM student WHERE (year_id LIKE '%".$_GET["txtKeyword"]."%' ) ";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
$Num_Rows = mysql_num_rows($objQuery);
?>
<?
?>
</div>
<table cellspacing="0" cellpadding="0" width="1200" border='0' align="center">
<?
while($objResult = mysql_fetch_array($objQuery))
{$zone_name=$objResult["zone_name"];
$sumtotal_zone= $sumtotal_zone+1;
?>
<tr >
<th colspan="9" scope="row"><div align="left">
<h3>
<?=$zone_name?>
</h3>
</div></th>
</tr>
<?
//**********************
?>
<?
{$school_i=0;
$sql5= "SELECT DISTINCT b.school_name
FROM student a,school b,class c,prefix d,province e,zone f
where
a.prefix_id=d.prefix_id and
a.school_id=b.school_id and
a.class_id=c.class_id and
b.province_id=e.province_id and
e.zone_id=f.zone_id and
a.year_id LIKE '%".$_GET["txtKeyword"]."%' and
f.zone_name='$zone_name'
order by a.student_id desc ";
$result5=mysql_query($sql5) or die ($sql5.mysql_error());
// echo $sql5;
// exit;
while($rows5=mysql_fetch_array($result5))
{
$school_name=$rows5["school_name"];
{
$color='#ffffff';
}
$school_i= $school_i+1;
{
?>
<tr height="35">
<th colspan="9" scope="row"><div align="left">
<?=$school_i?>
.
<?=$school_name?>
</div></th>
</tr>
<?
//*******************************************************************************************************
?>
<tr class="Caption"bgcolor="#919192" height="35" >
<th width="100" ><div align="center">No</div></th>
<th width="50"><div align="center">Class</div></th>
<th width="100"><div align="center">Date of Birth</div></th>
<th width="300"><div align="center">Name-Surname</div></th>
<th width="100"><div align="center">Mobile phone</div></th>
<th width="200"><div align="center">E-mail</div></th>
<th width="200"><div align="center">Facebook</div></th>
<th width="150" ><div align="center">Twitter</div></th>
</tr>
<?
{$student_i=0;
$school_ii=0;
$sum_schooli=0;
$sql3= "SELECT a.*,b.school_name,c.class_name,d.prefix_name,e.province_name,f.zone_name
FROM student a,school b,class c,prefix d,province e,zone f
where
a.prefix_id=d.prefix_id and
a.school_id=b.school_id and
a.class_id=c.class_id and
b.province_id=e.province_id and
e.zone_id=f.zone_id and
a.year_id LIKE '%".$_GET["txtKeyword"]."%' and
b.school_name='$school_name' and
f.zone_name='$zone_name'
order by a.student_id desc ";
$result3=mysql_query($sql3) or die ($sql3.mysql_error());
// echo $sql3;
// exit;
while($rows3=mysql_fetch_array($result3))
{
$student_id=$rows3["student_id"];
$number_id=$rows3["number_id"];
$school_name=$rows3["school_name"];
$class_name=$rows3["class_name"];
$date_of_birth=$rows3["date_of_birth"];
$prefix_name=$rows3["prefix_name"];
$name=$rows3["name"];
$surname=$rows3["surname"];
$mobile=$rows3["mobile"];
$email=$rows3["email"];
$facebook_id=$rows3["facebook_id"];
$twitter_id=$rows3["twitter_id"];
{
$color='#ffffff';
}
$student_i= $student_i+1;
$school_ii= $school_ii+1;