<?php
mysql_connect('localhost','admission2014','admission2014sgvu');
mysql_select_db("sgvuadmission");
?>
<table cellpadding="0" cellspacing="0" width="2000" border="1">
<tr><td>S.No.</td><td>sid</td><td>first Name</td><td>Middle Name</td><td>Last Name</td><td>Gender</td><td>DOB</td><td>Cat</td><td>Nationality</td><td>Student Mobile</td><td>Student Email</td><td>Photo</td><td>religion</td><td>Enroll Fee</td><td>Exam Fee</td><td>ICAP code</td><td>ICAP Date</td></tr>
<?php
$GetList=mysql_query("SELECT * FROM  `student_registration` WHERE  `step` =  '11' AND  `sesion` =9");
while($GetList1=mysql_fetch_assoc($GetList))
{
	$s =$_REQUEST['v'];

						$u = $s+0;
						
			$GetChkForm=mysql_query("SELECT * FROM  `only_sid` WHERE  `sid` ='$GetList1[sid]'");
			$GetChkForm1=mysql_num_rows($GetChkForm);
			if($GetChkForm1 > 0)
			
			{
			
						
						
	$GetPersonal=mysql_query("SELECT * FROM  `step1_perosonal` WHERE  `sid` =  '$GetList1[sid]'");
$GetPersonal1=mysql_fetch_assoc($GetPersonal);

//$GetChk=mysql_query("SELECT * FROM  `sgvu_stu_sem_allocate` WHERE  `sid` ='$GetList1[sid]'");
//$GetChk1=mysql_fetch_assoc($GetChk);
//if($GetChk1['sem'] =='1')
{

?>

<tr><td><?php echo $_REQUEST['v'] = $u+1; ?></td><td><?php 
//echo $GetList1['sid'];
$GetEnroll=mysql_query("SELECT * FROM  `sgvu_enrollment` WHERE  `sid` ='$GetList1[sid]'");
//echo mysql_num_rows($GetEnroll);
$GetEnroll1=mysql_fetch_assoc($GetEnroll);
echo $GetList1['sid'];

 ?></td><td><?php echo $GetPersonal1['firstname']; ?></td><td><?php echo $GetPersonal1['middlename']; ?></td><td><?php echo $GetPersonal1['lastname']; ?></td><td><?php echo $GetPersonal1['sex']; ?></td><td><?php echo $GetPersonal1['dob']; ?></td><td><?php  
$GetCat=mysql_query("SELECT * 
FROM  `category` 
WHERE  `id` ='$GetPersonal1[cat]'");
$GetCat1=mysql_fetch_assoc($GetCat);
echo $GetCat1['category'];
?></td><td><?php 
if($GetList1['city'] > 0)
{
$GetNat=mysql_query("SELECT * 
FROM  `sgvu_country` 
WHERE  `country_id` ='$GetList1[city]'");
$GetNat1=mysql_fetch_assoc($GetNat);
echo $GetNat1['country'];
 
}
else
{
echo 'INDIAN';	
}
?></td><td><?php echo $GetList1['mobile']; ?></td><td><?php echo $GetList1['email']; ?></td><td>
http://www.gyanvihar.org/new-admin/upload/<?php
$GetImage=mysql_query("SELECT * FROM  `step3_document` WHERE  `doc_type` =1 AND  `sid` ='$GetList1[sid]'");
$GetImage1=mysql_fetch_assoc($GetImage);
echo $GetImage1['image'];
?>
</td><td><?php  
$GetReligion=mysql_query("SELECT * FROM  `religion` WHERE  `id` ='$GetPersonal1[religion]'");
$GetReligion1=mysql_fetch_assoc($GetReligion);
echo $GetReligion1['religion'];
?></td><td>500</td><td></td><td>NUll</td><td>Null</td></tr>
<?php
}
}
}
?>

</table>