<?php
require_once(“config.php”);
?>
<!DOCTYPE html>
<html lang=“en”>
<head>
<meta http–equiv=“content-type” content material=“textual content/html; charset=UTF-8”>
<meta charset=“utf-8”>
<title>PHP GURUKUL | DEMO</title>
<meta title=“generator” content material=“Bootply” />
<meta title=“viewport” content material=“width=device-width, initial-scale=1, maximum-scale=1”>
<hyperlink href=“https://phpgurukul.com/how-to-search-employee-data-from-database-using-php/css/bootstrap.min.css” rel=“stylesheet”>
<!—[if lt IE 9]>
<script src=“//html5shim.googlecode.com/svn/trunk/html5.js”></script>
<![endif]—>
<hyperlink href=“css/kinds.css” rel=“stylesheet”>
</head>
<physique>
<nav class=“navbar navbar-default navbar-fixed-top” function=“navigation”>
<div class=“navbar-header”>
<h4 fashion=“padding-left: 100px;padding-top: 20px;”>PHP GURUKUL | Programming Weblog</h4>
</div>
</nav>
<div class=“container-fluid”>
<!—middle—>
<div class=“col-sm-8”>
<div class=“row”>
<div class=“col-xs-12”>
<h3 fashion=“padding-left: 100px;”>Search worker knowledge from database on the foundation of Title, E mail, Cellular Quantity and Worker ID</h3>
<hr >
<kind title=“bwdatesdata” motion=“” methodology=“put up” motion=“”>
<desk width=“100%” peak=“117” border=“0”>
<tr>
<th width=“27%” peak=“63” scope=“row”>Search :</th>
<td width=“73%”>
<enter id=“searchdata” sort=“textual content” title=“searchdata” required=“true” class=“form-control”>
</td>
</tr>
<tr>
<th width=“27%” peak=“63” scope=“row”></th>
<td width=“73%”>
<button class=“btn-primary btn” sort=“submit” title=“search”>Submit</button>
</tr>
</desk>
</kind>
</div>
</div>
<hr>
<div class=“row”>
<div class=“col-xs-12”>
<?php if(isset($_POST[‘search’])) {
$sdata=$_POST[‘searchdata’];
?>
<h3 fashion=“padding-left: 100px;shade:blue”>End result towards “<?php echo $sdata;?>“ key phrase</h3>
<hr >
<div class=“row”>
<desk class=“desk table-bordered” width=“100%” border=“0” fashion=“padding-left:40px”>
<thead>
<tr>
<th scope=“col”>S.NO</th>
<th scope=“col”>Worker Title</th>
<th scope=“col”>Division</th>
<th scope=“col”>Cellular Quantity</th>
<th scope=“col”>E mail</th>
<th scope=“col”>Worker ID</th>
<th scope=“col”>Becoming a member of Date</th>
</tr>
</thead>
<?php
$ret=mysqli_query($con,“choose * from tblempdata the place EmployeeName like ‘%$sdata%’ || E mail like ‘%$sdata%’ || MobileNumber like ‘%$sdata%’ || EmpID like ‘%$sdata%'”);
$num=mysqli_num_rows($ret);
if($num>0){
$cnt=1;
whereas ($row=mysqli_fetch_array($ret)) {
?>
<tbody>
<tr knowledge–expanded=“true”>
<td><?php echo $cnt;?></td>
<td><?php echo $row[‘EmployeeName’];?></td>
<td><?php echo $row[‘Department’];?></td>
<td><?php echo $row[‘MobileNumber’];?></td>
<td><?php echo $row[‘Email’];?></td>
<td> <?php echo $row[‘EmpID’];?></td>
<td><?php echo $row[‘JoiningDate’];?></td>
</tr>
<?php
$cnt=$cnt+1;
} } else { ?>
<tr>
<td colspan=“8”> No document discovered towards this search</td>
</tr>
<?php } }?>
</tbody>
</desk>
</div>
</div>
</div>
</div><!—/middle—>
<hr>
</div><!—/container–fluid—>
<!— script references —>
<script src=“//ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js”></script>
<script src=“js/bootstrap.min.js”></script>
</physique>
</html>