<?
session_start();
if(strlen($user)<=0)
{
 print "<script> alert('You are not logged in') </script>";
 include("logout.php");
 return;
}
$tbl='part_lab'.$brcode.$user;
 $show_tb=mysqli_query($db,"show tables like '$tbl'");
if(mysqli_num_rows($show_tb)>0)
  		{
 		mysqli_query($db,"drop table $tbl");
 		 }
$cr_tb = mysqli_query($db,"create table $tbl  partcode,partname,DEVICE_DATE,DEVICE_ID,FUEL,ALTITUDE,SPEED,GSM,DISTANCE from $table");