<form  method="post">
<table border="0" width="100%" class="tc">
  <tr>
    <td colspan="3" align="center" style="color:blue;"><h1>CHARACTER CERTIFICATE </h1></td>
    </tr>
  <tr>
  
                           
  
  
  
    <td colspan="3">
    
    </tr>
  
  <tr>
  <?php
  $detail=$db->getVal("SELECT max(cc_number) FROM new_cc;");
    ?>
	<td colspan="3"> 
	<div>
		<div class="well no-padding">
	<div class="control-group">
							<label class="control-label" for="feducation">Sr-No</label>
							<div class="controls">
								<span class="txt"><input CLASS="txt" type="text" id="feducation" readonly name="SrNo" class="input-block-level" value="<?php echo $detail+1; ?>" ></span>
							</div>
						</div>
						
						 <div class="control-group">
							<label class="control-label" for="feducation">Name Of Pupil</label>
							<div class="controls">
								<span class="txt"><input CLASS="txt" type="text" id="Pupil" name="Pupil" class="input-block-level" value="" ></span>
							</div>
						</div>
						
						
						<div class="control-group">
							<label class="control-label" for="feducation">Name Of Father</label>
							<div class="controls">
								<span class="txt"><input CLASS="txt" type="text" id="father" name="father" class="input-block-level" value="" ></span>
							</div>
						</div>
						
					<div class="control-group">
							<label class="control-label" for="feducation">Class</label>
							<div class="controls">
								<span class="txt"><input CLASS="txt" type="text" id="class" name="class" class="input-block-level" value="" ></span>
							</div>
						</div>
						
					
						
						 <div class="control-group">
							<label class="control-label" for="feducation">Session</label>
							<div class="controls">
								<span class="txt"><input CLASS="txt" type="text" id="passingpased" name="passingpased" class="input-block-level" value="" ></span>
							</div>
						</div>
						
						</div>
						
	
	<center><div class="control-group">
	<?PHP    


session_start();


 if (isset($_POST['SUBMIT'])) { 
 
 $_SESSION['adminno1'] = $_POST['adminno'];
 $_SESSION['nameofpupil1'] = $_POST['nameofpupil'];
 
 
$value=array(
"cc_number"=>$_POST['SrNo'],
"passingpased"=>$_POST['passingpased'],
"pupil_name"=>$_POST['Pupil'],
"father_name"=>$_POST['father'],
"class"=>$_POST['class'],




); 
// print_r($value);
 $flgIn=$db->insertAry("new_cc",$value);
 
 }
if($flgIn>0)
{
?>	
<a class="button" href="print/?page_id=new-cc&action=print&id=<?PHP echo $detail+1;?>" >PRINT CC</a>';	

<?php }

else

{
?>
<input type="submit" name="SUBMIT">
<?php
}	
?> 

 
	
	
	</div></center>
	
	
	
	
	
	
	
 
</td>
    </tr>
 

</table>
</form><style>

</style>
<?php

 


?>
<style>
.button {
    display: block;
    width: 115px;
    height: 25px;
    background: #4E9CAF;
    padding: 10px;
    text-align: center;
    border-radius: 5px;
    color: white;
    font-weight: bold;
}
</style>
<SCRIPT>
$(document).ready(function(){
    $("a.submit").click(function(){
        document.getElementById("myForm").submit();
    }); 
});
</SCRIPT>
