<?php
if($_POST["submit"] && $_POST["tname"] && $_POST["tPrice"] && $_POST["cat"])

{
	$tname= $_POST['tname'];
	$tPrice=$_POST['tPrice'];   
  $cat=$_POST['cat']; 
  $regdate=Date("Y-m-d"); 
  //CHECKING ENDS HERE
  require_once"labClass.php";
  $con=new labClass();
  if(!$con->vtname($tname) || !$con->vtPrice($tPrice))  
          {
            
            require_once "mTestListErr.php";
 
         }
 
   else  {
               $rQ= $con->registerMtest($cat,$tname, $tPrice);

               //print_r($rQ);

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

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

               }
   
 
         }
}


?>