<?php 
	if(isset($_POST["them"]))
	{
		$tentl = $_POST["tentl"];
		$thutu = $_POST["thutu"];
		settype($thutu, "int");
		$anhien = $_POST["anhien"];
		settype($anhien, "int");
		$tenkhongdau = $quantridata -> changeTitle($tentl);
		$quantridata -> themtheloai($tentl,$tenkhongdau,$thutu,$anhien);
		header("location:quantritueba.php?page=theloai");
	}
	
 ?>
<form action="" method="POST" class="mt-2">
	<div class="form-group row">
		<label for="" class = "col-md-2">Tên thể loại</label>
		<input type="text" class="form-control col-md-4" name="tentl"  placeholder="Nhập ...">	
	</div>
	<div class="form-group row">
		<label for="" class = "col-md-2">Thứ tự</label>
		<input type="text" class="form-control col-md-4" name="thutu"  placeholder="Nhập ...">	
	</div>
	<div class="form-group row">
		<label for="" class = "col-md-2">Ẩn hiện</label>
		<div class="form-check form-check-inline col-md-1">
  			<input class="form-check-input" type="radio" name="anhien" value="1" checked>
 		 	<label class="form-check-label" for="">Hiện</label>
		</div>	
		<div class="form-check form-check-inline col-md-1">
  			<input class="form-check-input" type="radio" name="anhien" value="0">
 		 	<label class="form-check-label" for="">Ẩn</label>
		</div>
	</div>
	 <button type="submit" class="btn btn-primary" name="them">Thêm</button>	
</form>