<?php
  
 
if($_POST["submit"])

{

	$tname= $_POST['tname'];

	 $tPrice=$_POST['tPrice'];   
 
    $exDate=$_POST['sdate']; 

                                                             //CHECKING ENDS HERE

  require_once"labClass.php";

  $con=new labClass();

  if(!$con->vtPrice($tPrice))
          
          {
            
          ?>
            <h6 class="text-danger">Error occured!..</h6>
          <?php
            require_once "expensesRegForm.php";

 
        }
 
  else    {
               $rQ= $con->registerEx($tname, $tPrice,$exDate);

               //print_r($rQ);

                if($rQ->rowCount()>0)
                {

                 
                ?>
                <h6 class="text-success">Successfull added!..</h6>
                <?php
              
                require_once "expensesRegForm.php";

               }
   
 
         }
}


?>