<?php
session_start();
include 'dbc.php';

$userid=$_SESSION['userid'];

$id=$_REQUEST["id"];

 $sqlcus1 = "SELECT * FROM admission WHERE id  = '$id'";
$result1=$conn->query($sqlcus1);
$ppp = $result1 ->fetch_assoc();
				
				$app_file=$ppp['app_file'] ;

 	    
		
echo "<table border=0 width=100% align=center bgcolor=white>";
echo "<tr>";
echo "<td bgcolor=white align=left colspan=2>" ."<img src='logo1.jpg' />" . "</td>";
echo "<td bgcolor=white align=center colspan=2><font color=black size=2pt face=Arial><h1>"  .$userid . "</h1>A PROJECT OF ANJUMAN-E-HUSSAINIA KHAWAJGAN <br>Our Motto to Make This School The Best School of Walled City<br>ENGLISH MEDIUM ADMISSION FORM" .  "</font></td>";
echo "<td  align=right bgcolor=white>" ."<img src='app_images1/".$ppp[app_file]."' width='100' height='130' />" . "</td>";
echo "</tr>";
echo "<tr>";
echo "<th bgcolor=white align=left colspan=6> <hr></th>";
echo "</tr>";
echo "</table>";

echo "<table border=1 style=border:solid black width=100% align=center bgcolor=white>";
echo "<tr>";
echo "<th bgcolor=white align=left> Admission No: </th>";
  echo "<td>"  .$ppp["adm_no"] . "</td>" ;
  echo "<th bgcolor=white align=left> Roll No: </th>";
  echo "<td>"  .$ppp["std_rollno"] . "</td>" ;
  echo "</tr>";
 
  echo "<tr>";
echo "<th bgcolor=white align=left> Student Name: </th>";
  echo "<td >"  .$ppp["std_name"] . "</td>" ;
echo "<th bgcolor=white align=left> Date of Birth : </th>";
  echo "<td >"  .$ppp["dob"] . "</td>" ;
  echo "</tr>";
   echo "<tr>";
    echo "<th bgcolor=white align=left> Admission required in class : </th>";
  echo "<td >"  .$ppp["class_name"]  . "</td>" ;

  echo "<th bgcolor=white align=left> Class Section : </th>";
  echo "<td >"  .$ppp["cls_sec"] . "</td>" ;
  echo "</tr>";
  echo "<tr>";
  echo "<th bgcolor=white align=left> Previous Class: </th>";
  echo "<td >"  .$ppp["pclass"] . "</td>" ;
   echo "<th bgcolor=white align=left> Previous School: </th>";
  echo "<td>"  .$ppp["pschool"] . "</td>" ;
  echo "</tr>";
   echo "<tr>";
  echo "<th bgcolor=white align=left> Gender: </th>";
  echo "<td >"  .$ppp["gender"] . "</td>" ;
   echo "<th bgcolor=white align=left> Religion: </th>";
  echo "<td>"  .$ppp["religion"] . "</td>" ;
  echo "</tr>";
  echo "<tr>";
  echo "<th bgcolor=white align=left> Address: </th>";
  echo "<td colspan=3>"  .$ppp["address"] . "</td>" ;
  echo "</tr>";
 echo "<tr>";
  echo "<th bgcolor=white align=left> Fee Status: </th>";
  echo "<td >"  .$ppp["feestatus"] . "</td>" ;
  echo "<th bgcolor=white align=left> Paid By: </th>";
  echo "<td >"  .$ppp["paidby"] . "</td>" ;
  echo "</tr>";
 
 
  echo "<tr height=55>";
echo "<th bgcolor=yellow align=left colspan=4><font color=black size=4pt face=Arial>PARENTS /GUARDIAN</font></th>";
echo "</tr>";
  echo "<tr>";
   echo "<th bgcolor=white align=left> Father's Name:  </th>";
  echo "<td>"  .$ppp["fname"] . "</td>" ;
  echo "<th bgcolor=white align=left>  Guardian's Name:  </th>";
  echo "<td>"  .$ppp["gname"] . "</td>" ; 
  echo "</tr>";
   echo "<tr>";
  echo "<th bgcolor=white align=left> Qualification: </th>";
  echo "<td colspan=3>"  .$ppp["qualification"] . "</td>" ;
  echo "</tr>";
  echo "<tr>";
   echo "<th bgcolor=white align=left> Father's Nic No:  </th>";
  echo "<td>"  .$ppp["fname"] . "</td>" ;
  echo "<th bgcolor=white align=left>  Guardians Nic No:  </th>";
  echo "<td>"  .$ppp["gname"] . "</td>" ; 
  echo "</tr>";
 
   echo "<tr>";
   echo "<th bgcolor=white align=left> Cell #:  </th>";
  echo "<td>"  .$ppp["cell_1"] . "</td>" ;
  echo "<th bgcolor=white align=left>  Cell #:  </th>";
  echo "<td>"  .$ppp["cell_3"] . "</td>" ; 
  echo "</tr>";
   echo "<tr>";
   echo "<th bgcolor=white align=left> Mother's Name:  </th>";
  echo "<td>"  .$ppp["mnic"] . "</td>" ;
  echo "<th bgcolor=white align=left>  Mother's Cell No:  </th>";
  echo "<td>"  .$ppp["cell_1"] . "</td>" ; 
  echo "</tr>";
   echo "<tr>";
   echo "<th bgcolor=white align=left> Caste:  </th>";
  echo "<td>"  .$ppp["caste"] . "</td>" ;
  echo "<th bgcolor=white align=left>  Qabeela:  </th>";
  echo "<td>"  .$ppp["qabeela"] . "</td>" ; 
  echo "</tr>";
  echo "<tr>";
   echo "<th bgcolor=white align=left> Business / Job:  </th>";
  echo "<td>"  .$ppp["job"] . "</td>" ;
  echo "<th bgcolor=white align=left>  Income/Salary:  </th>";
  echo "<td>"  .$ppp["income"] . "</td>" ; 
  echo "</tr>";

 echo "<tr height=75>";
echo "<th bgcolor=white align=left>  Date:  </th>";
  echo "<td>"  .$ppp["date"] . "</td>" ; 
echo "<th align=right colspan=2 ><font color=black size=3pt face=Arial> Parents Signature</font></th>";
echo "</tr>";
 
  
//$result = mysql_query("SELECT * FROM instalfee where rollno='$std_rollno' and user_id='$userid' ORDER BY date");
echo "<tr height=55>";
echo "<th bgcolor=red align=left colspan=4><font color=black size=4pt face=Arial> OFFICE USE ONLY</font></th>";
echo "</tr>";

	
	 echo "<tr>";
  echo "<th bgcolor=white align=left> Form #: </th>";
  echo "<td >"  .$ppp["id"] . "</td>" ;
   echo "<th bgcolor=white align=left> Admission #:  </th>";
  echo "<td >"  .$ppp["adm_no"] . "</td>" ;
  echo "</tr>";
   echo "<tr>";
  echo "<th bgcolor=white align=left> Roll #: </th>";
  echo "<td >"  .$ppp["std_rollno"] . "</td>" ;
   echo "<th bgcolor=white align=left> Monthly Fee:  </th>";
  echo "<td >"  .$ppp["mfee"] . "</td>" ;
  echo "</tr>";
   echo "<tr>";
  echo "<th bgcolor=white align=left> Remarks by Principal: </th>";
  echo "<td colspan=3>"  .$ppp["remarks"] . "</td>" ;

  echo "</tr>";
	

 echo "<tr height=95>";

 echo "<td align=left colspan=4>" . "<br><br> Principal:__________________  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenor:.__________________ " . "</td>";

  echo "</tr>";
echo "</table>";
	 
 
?>



