<?php include "layouts/menu.php"; ?> <div class="right_col" role="main">
            <div class="row">
                 <!-- page header -->
                <div class="col-lg-12">
                    <h1 class="page-header  alert alert-info">Investments</h1>
                </div>
                <!--end page header -->
            </div>
            <div class="row">
                <div class="col-lg-12">
                    <!-- Form Elements -->
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            Fill The Form
                        </div>
                        <div class="panel-body">
                            <div class="row">
							
					
   <div class="alert alert-info">Register Investments Here</div>
   <form name="form1" class="form-horizontal" method="post" action="investment.php" enctype="multipart/form-data">
   
    <div class="form-group">
    <label for="inputPassword3" class="col-sm-2 control-label">No</label>
    <div class="col-sm-4">
	<input type="hidden" class="form-control" id="inputPassword3" name="mfin" value="" placeholder="" required>
	<input type="hidden" class="form-control" id="inputPassword3" name="scode" value="" placeholder="" required>
      <input type="text" class="form-control" id="inputPassword3" name="noo" value="" placeholder="Infossel" required>
	  
    </div>
  </div>
  <div class="form-group">
    <label for="inputPassword3" class="col-sm-2 control-label">Post Date</label>
	  <div class="col-sm-4">
      <input type="text" class="form-control" id="datepicker" name="postdate" value="" placeholder="DD/MM/YYYY" onfocus="insertDate(this,'DD-MM-YYYY')" required>
    </div>
  </div> 
   <div class="form-group">
    <label for="inputPassword3" class="col-sm-2 control-label">Agent Name</label>
    <div class="col-sm-4">
      <input type="text" class="form-control" id="inputPassword3" name="agentname" value="" placeholder="" required>
    </div>
  </div>
  <div class="form-group">
    <label for="inputPassword3" class="col-sm-2 control-label">Post Amount</label>
       <div class="col-sm-4">
      <input type="text" class="form-control" id="inputPassword3" name="postamt" value="" placeholder="" required>
    </div>
  </div>	
  <div class="form-group">
    <label for="inputPassword3" class="col-sm-2 control-label">HPL</label>
       <div class="col-sm-4">
      <input type="text" class="form-control" id="inputPassword3" name="hpl" value="" placeholder="" required>
    </div>
  </div>  
    <div class="form-group">
    <label for="inputPassword3" class="col-sm-2 control-label">Name</label>
        <div class="col-sm-4">
      <input type="text" class="form-control" id="inputPassword3" name="name" value="" placeholder="" required>
    </div>
  </div>
    <div class="form-group">
    <label for="inputPassword3" class="col-sm-2 control-label">Post Amount2</label>
      <div class="col-sm-4">
      <input type="text" class="form-control" id="inputPassword3" name="postamt2" value="" placeholder="" required>
    </div>
  </div>
    <div class="form-group">
    <label for="inputPassword3" class="col-sm-2 control-label">Result</label>
        <div class="col-sm-4">
      <input type="text" class="form-control" id="inputPassword3" name="result" value="" placeholder="" required>
    </div>
  </div>
    <div class="form-group">
    <label for="inputPassword3" class="col-sm-2 control-label">Prom Date</label>
        <div class="col-sm-4">
      <input type="text" class="form-control" id="inputPassword3" name="promdate" value="" placeholder="" required>
    </div>
  </div>
  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
      <button type="submit" class="btn btn-default" name="s1">Save This</button>
    </div>
  </div>
      <div class="alert alert-success">
	<?php
							if(isset($_POST['s1']))
							{
								extract($_POST);
								
								$insert=mysqli_query($conn, "insert into otherentry(mfin,scode,noo,postdate,agentname,postamt,hpl,name,postamt2,result,promdate)
											 values('$mfin','$scode','$noo','$postdate','$agentname','$postamt','$hpl','$name','$postamt2','$result','$promdate')");
								
								if($insert)
								{
									echo "SUCCESSFULLY REGISTERED ";
																}
								else
								{
									echo "Failure";
								}
							}
?>    	  </div>
</form>
</div> 
 <?php
				
						$qry=mysqli_query($conn, "select * from otherentry where mfin='$mfin'");
						$n=mysqli_num_rows($qry);
						if($n==0)
						{
							echo "Nothing To Display";
						}
						else
						
					{ 
						?>
    <section class="content">
                    <div class="row">
                        <div class="col-xs-12"> 
                            <div class="box">
                               <!-- /.box-header -->
                                <div class="box-body table-responsive">
                                    <table id="table2" class="table table-bordered table-striped">
                                        <thead>
                                            <tr>
							<th>No</th>
								<th>Post Date</th>	
								<th>Agent Name</th>	
								<th>Post Amount</th>	
								<th>HPL</th>	
								<th>Name</th>
									<th>Post Amount 2</th>
										<th>Result</th>
								<th>Prom Date</th>
                                            </tr>
                                        </thead>
										<?php 
					while($row2=mysqli_fetch_array($qry))
						{
					?>
                                        <tbody>
                                           <tr>
                         <td><?php echo $row2['noo'];?></td>						
                  <td><?php echo $row2['postdate'];?></td>	
  <td><?php echo $row2['agentname'];?></td>	
  <td><?php echo $row2['postamt'];?></td>	
  <td><?php echo $row2['hpl'];?></td>	
  <td><?php echo $row2['name'];?></td>	  
  <td><?php echo $row2['postamt2'];?></td>	
  <td><?php echo $row2['result'];?></td>	  
					  <td><?php echo $row2['promdate'];?></td>	

						
                                            </tr>
                                          </tbody>
                                        <?php
						}
					
				}
					?>
					                    
                                    </table>		
                                </div><!-- /.box-body -->
                            </div><!-- /.box -->
 
</div>
</div>
	  </div>

</div></div></div></div>
<?php include "layouts/footer.php"; ?></body></html>