<?php
session_start();

include 'dbc.php';

$userid=$_SESSION['userid'];
$username=$_SESSION['username'];
$id=$_REQUEST["id"];

  $sqlcus = "select * from inq where id='$id' and user_id='$userid'";
   $result=$conn->query($sqlcus);
$ppp = $result->fetch_assoc();
   $class_name=$ppp['class_name'] ;

$sql1 = "SELECT * FROM addclass where cname = '$class_name' and user_id='$userid'";
$result1=$conn->query($sql1);
$row1 = $result1->fetch_assoc();
$feedisc1=$row1['feedisc1'] ;
$fee1=$row1['fee1'] ;
$feedisc2=$row1['feedisc2'] ;
$fee2=$row1['fee2'] ;
$feedisc3=$row1['feedisc3'] ;
$fee3=$row1['fee3'] ;
$feedisc4=$row1['feedisc4'] ;
$fee4=$row1['fee4'] ;
$feedisc5=$row1['feedisc5'] ;
$fee5=$row1['fee5'] ;
$feedisc6=$row1['feedisc6'] ;
$fee6=$row1['fee6'] ;
 	    
		
echo "<table border=1 width=50% align=center bgcolor=white>";
?>
<tr>
<td align="center" colspan="4"><img src="logo1.jpg" /></td>

</tr>
<?php
echo "<tr>";
echo "<th bgcolor=white align=center colspan=4>  $userid </th>";
echo "</tr>";
echo "<tr>";
echo "<th bgcolor=white align=center colspan=4>  Registration Slip </th>";
echo "</tr>";
echo "<tr>";
  echo "<th bgcolor=white align=left colspan=3>  Date </th>";
  echo "<td>"  .$ppp["date"] . "</td>" ; 
   echo "</tr>";

echo "<tr>";
  echo "<th bgcolor=white align=left colspan=3> Inquiry No </th>";
  echo "<td>"  .$ppp["id"] . "</td>" ;
  echo "</tr>";

echo "<tr>";
  echo "<th bgcolor=white align=left colspan=3>  Student's Name </th>";
  echo "<td>"  .$ppp["std_name"] . "</td>" ; 
  echo "</tr>";

echo "<tr>";
  echo "<th bgcolor=white align=left colspan=3> Father's Name </th>";
  echo "<td>"  .$ppp["fname"] . "</td>" ;
  echo "</tr>";
  echo "<tr>";
  echo "<th bgcolor=white align=left colspan=3> Admission in Class  </th>";
  echo "<td>"  .$ppp["class_name"] . "</td>" ;
  echo "</tr>";

echo "<tr>"; 
  echo "<th bgcolor=white align=left colspan=3> Contact No </th>";
  echo "<td>"  .$ppp["cell_1"] . "</td>" ;
  echo "</tr>";
  echo "<tr>";
  echo "<th bgcolor=white align=left colspan=3> Date of Birth  </th>";
  echo "<td>"  .$ppp["dob"] . "</td>" ; 
  echo "</tr>";

echo "<tr>";
   echo "<th bgcolor=white align=left colspan=3> Address </th>";
  echo "<td>"  .$ppp["address"] . "</td>" ; 
  echo "</tr>";
  echo "<tr>";
   echo "<th bgcolor=white align=left colspan=3> Job </th>";
  echo "<td>"  .$ppp["job"] . "</td>" ; 
  echo "</tr>";
  echo "<tr>";
  echo "<th bgcolor=white align=left colspan=3> Reg Fee </th>";
  echo "<td>"  .$ppp["sec_fee"] . "</td>" ;
  echo "</tr>";
 echo "<tr>";
  echo "<th bgcolor=white align=left colspan=3> Collected By  </th>";
  echo "<td><a href='Inquiry_Reports.php'>"  .$ppp["gname"] . "</a></td>" ; 
  echo "</tr>";
 echo "<tr>";
echo "<th bgcolor=white align=center colspan=4>  Fee  Details </th>";
echo "</tr>";
   echo "<tr>";
  echo "<th bgcolor=white align=left colspan=3> $feedisc1 </th>";
  echo "<td>"  .$fee1 . "</td>" ;
  echo "</tr>";
   echo "<tr>";
  echo "<th bgcolor=white align=left colspan=3> $feedisc2 </th>";
  echo "<td>"  .$fee2 . "</td>" ;
  echo "</tr>";
   echo "<tr>";
  echo "<th bgcolor=white align=left colspan=3> $feedisc3 </th>";
  echo "<td>"  .$fee3 . "</td>" ;
  echo "</tr>";
   echo "<tr>";
  echo "<th bgcolor=white align=left colspan=3> $feedisc4 </th>";
  echo "<td>"  .$fee4 . "</td>" ;
  echo "</tr>";
   echo "<tr>";
  echo "<th bgcolor=white align=left colspan=3> $feedisc5 </th>";
  echo "<td>"  .$fee5 . "</td>" ;
  echo "</tr>";
   echo "<tr>";
  echo "<th bgcolor=white align=left colspan=3> $feedisc6 </th>";
  echo "<td>"  .$fee6 . "</td>" ;
  echo "</tr>";
   echo "<tr>";
  echo "<th bgcolor=white align=left colspan=4> Registration is Valid for Current month.  </th>";
 
  echo "</tr>";
 echo "</table>";
	 
 
?>

