Your IP : 3.137.177.204
<form method="post"><?php
session_start(); ob_start();
include("../../data.inc.php");
/* The search input from user ** passed from jQuery .get() method */
$searchitem = $_GET["searchData"];
// $word = explode(" ",$searchitem);
// $searchitem1 = $word[0]; $searchitem2 = $word[1]; $searchitem3 = $word[2];
/* If connection to database, run sql statement. */
// if ($con) {
$fetch = $db->query("SELECT * from mdata where (surname like '%".$searchitem."%' or firstname like '%".$searchitem."%' or othername like '%".$searchitem."%' or phone like '%".$searchitem."%' or phone2 like '%".$searchitem."%') and rid = '$rid' order by surname asc, othername asc limit 0,150");
$num=mysqli_num_rows($fetch);
/*
Retrieve results of the query to and build the table.
We are looping through the $fetch array and populating
the table rows based on the users input.
*/
$sResults = '';
$sResults .= '<table class="table table-hover no-border" width="100%">
<tr>
<!-- <th>Tick</td> -->
<th>Name</th>
<th>District/Section</th>
</tr>';
$x = 0;
while ( $row = mysqli_fetch_object( $fetch ) ) { $id = $row->sn;
$x = $x + 1; $st=regStatus($id);
if($st>0){ $col = 'bgcolor="#99FF99"'; } else{
$col = '';}
$sResults .= '<tr '.$col.'>';
// $sResults .= '<td>' . $x . '</td>';
$sResults .= '<td><a href="?user='.$row->sn.'">' .ucwords(strtolower(userName($row->id))) . '</a></td>';
$sResults .= '<td>';// . $row->phone ;
$sResults .= ' ' . didName($row->did) .', ' . $row->section . '</td>';
$sResults .='</a></tr>';
}
$sResults .= '</table>';
// }
/* Free connection resources. */
//mysqli_close($con);
/* Toss back the results to populate the table. */
echo $sResults;
//echo '<table><tr><td colspan="4"><b>Count: '.$x.'</b></td></tr></table>';
?>
<hr />Count: <strong><?php echo $x; ?></strong>
<!--
<input type="submit" class="btn btn-success" value="Register Participant(s)" name="reg" style="width:100%" >
---->
</form>