<?php

include("connection.php");

?>

<?php

if (($_POST['certificationNumber']) && !empty($_POST['certificationNumber'])) {
	// print_r($_POST);
	// die;

	$certificat = $_POST['certificationNumber'];

	$scheme = $_POST['certificate-scheme'];

	$comp = $_POST['companyName'];
	$slqq = mysqli_query($link, "SELECT * FROM tbl_certification WHERE certificationNumber='$certificat'");
	if ($slqq) {

		if (mysqli_num_rows($slqq) > 0) {

			$arr = mysqli_fetch_assoc($slqq);

			?>

			<div class="text-center" style="font-weight:bold;"><?= $arr['certificationNumber']; ?></div>

			<table class="table table-border">

				<tr>

					<th>Certification Number</th>

					<td><?= $arr['certificationNumber']; ?></td>

				</tr>

				<tr>

					<th>Company Name</th>

					<td class='companyName'><?= $arr['companyName']; ?></td>

				</tr>

				<tr>

					<th>Address</th>

					<td class='address'><?= $arr['address']; ?></td>

				</tr>

				<tr>

					<th>Scheme</th>

					<td class='scheme'><?= $arr['scheme']; ?></td>

				</tr>

				<tr>

					<th>Valid Till</th>

					<td class='validTill'><?= $arr['validTill']; ?></td>

				</tr>

			</table>

			<?php

		} else {

			echo "<p style='color:red;text-align:center;'>Search Not Found!!!</p>";

		}

	}

} else {

	echo "<p style='color:red;text-align:center;'>Certification Number is required!!!</p>";

}



?>