| Current Path : /home/bolconlineco/www/coordinator/ |
| Current File : /home/bolconlineco/www/coordinator/searchbycountry.php |
<?php
ob_start();
session_start();
?>
<?php include('includes/header.php'); ?>
<?php
if(!isset($_SESSION['coordinator']) || $_SESSION['coordinatorrole'] != 2)
{
header("location:../index.php");
exit();
}
?>
<script language="javascript" src="includes/jquery.js"></script>
<div id="content">
<span class="left"> </span><h2> Search Student by Country</h2><span class="right"></span>
<div id="frm">
</div>
<?php
if(isset($_GET['rollno']))
{
$rollno=sql_strip($_GET['rollno']);
}
?>
<form action="" method="post" >
<ul class="col" >
<li>
<label for="name"> Country:</label>
<select name="country" id="country">
<option value="">-- Select Country --</option>
<?php
$result=mysql_query("select distinct country from student") or die(mysql_error());
while($row=mysql_fetch_array($result))
{
?>
<option value="<?php echo $row['country'];?>"><?php echo $row['country'];?></option>
<?php } ?>
</select>
</li>
</ul>
</form>
<div id="data">
<div id="coutry-show">
</div>
</div>
</div> <!-- end content -->
</div><!-- end wrapper -->
<script language="javascript">
$("document").ready(function(){
var countryshow=$('#coutry-show');
$("#country").change(function(){
var country=$(this).val();
$.post('get_country.php',{id:country},function(data){
countryshow.html(data);
})
});
});
</script>
<script language="javascript">
$("document").ready(function(){
var course=$('#data');
$("#course").change(function(){
var courseId=$(this).val();
$.post('studentbycourse.php',{id:courseId},function(data){
course.html(data);
course.removeAttr('disabled');
})
});
});
</script>
<?php
/*
if(isset($_POST['assigncourse']))
{
$categoryId=sql_strip($_POST['category']);
$courseid=sql_strip($_POST['course']);
$rollno=sql_strip($_POST['rollno']);
$sql="insert into assigncourse values('','$rollno','$categoryId','$courseid')";
$result=mysql_query($sql) or die(mysql_error());
if($result)
{
$msg="course assign successfully";
header("location:assigncourse.php?msg=$msg");
exit();
}
}*/
?>
<?php include('../includes/footer.php');?>