ID |
NAME |
REFERED BY |
MOBILE NO. |
CITY |
ADDRESS |
STATE |
LOCATION |
EMAIL |
BLOOD GROUP |
DATE OF BIRTH |
DATE OF REGISTRATION |
GENDER |
";
echo"".$row['id']." | ";
echo"".$row['name']." | ";
echo"".$row['ref']." | ";
echo"".$row['mob']." | ";
echo"".$row['city']." | ";
echo"".$row['address']." | ";
echo"".$row['state']." | ";
echo"".$row['locatin']." | ";
echo"".$row['email']." | ";
echo"".$row['bg']." | ";
echo"".$row['dob']." | ";
echo"".$row['dor']." | ";
echo"".$row['Gender']." | ";
echo"";
}
function getData()
{
$data = array();
$data[1]=$_POST['id'];
$data[2]=$_POST['name'];
$data[3]=$_POST['ref'];
$data[4]=$_POST['mob'];
$data[5]=$_POST['city'];
$data[6]=$_POST['address'];
$data[7]=$_POST['state'];
$data[8]=$_POST['locatin'];
$data[9]=$_POST['email'];
$data[10]=$_POST['bg'];
$data[12]=$_POST['dob'];
$data[13]=$_POST['dor'];
$data[14]=$_POST['Gender'];
return $data;
}
if(isset($_POST['search']))
{
$info = getData();
$search_query="SELECT * FROM reg WHERE name='$info[1]'";
$search_result= mysqli_query($con,$search_query);
if($search_result)
{
if(mysqli_num_rows($search_result))
{
while($rows = mysqli_fetch_array($search_result))
{
$id=$rows['id'];
$name = $rows['name'];
$ref= $rows['ref'];
$mob = $rows['mob'];
$city = $rows['city'];
$address = $rows['address'];
$state = $rows['state'];
$locatin = $rows['locatin'];
$email = $rows['email'];
$bg = $rows['bg'];
$dob = $rows['dob'];
$dor = $rows['dor'];
$Gender = $rows['Gender'];
}
}else{
echo("No Data");
}
}else{
echo("result error");
}
}
?>
PATHOLOGY LABORATORY