<?php

include "./config/database.php";

$sql= "SELECT * FROM settings WHERE id='2'";
$result = mysqli_query($link,$sql);
$page = mysqli_fetch_assoc($result); 
  
	

if(isset($_POST['submit'])){

	$tid = $_POST['tid'];




	if($tid == ""){

	echo "<script>alert('Please enter a tracking Number')</script>";

	}else{


		$sql= "SELECT * FROM track WHERE pid = '$tid'";
		$result = mysqli_query($link,$sql);
		if(mysqli_num_rows($result) > 0){
		  $row = mysqli_fetch_assoc($result);

		  $pid = $row['pid'];
		  if(isset($row['pid'])){

			  $pid = $row['pid'];



	if($tid == $pid){



	header("Location:result.php?track=$tid");

	}

	else{

		echo "<script>alert('No record for the track number')</script>";
	}

}

}

}
}

?>
<!doctype html>
<html lang="zxx">

<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="assets/css/bootstrap.min.css">
    <!-- Owl Theme Default CSS -->
    <link rel="stylesheet" href="assets/css/owl.theme.default.min.css">
    <!-- Owl Carousel CSS -->
    <link rel="stylesheet" href="assets/css/owl.carousel.min.css">
    <!-- Owl Magnific CSS -->
    <link rel="stylesheet" href="assets/css/magnific-popup.css">
    <!-- Animate CSS -->
    <link rel="stylesheet" href="assets/css/animate.css">
    <!-- Boxicons CSS -->
    <link rel="stylesheet" href="assets/css/boxicons.min.css">
    <!-- Flaticon CSS -->
    <link rel="stylesheet" href="assets/css/flaticon.css">
    <!-- Meanmenu CSS -->
    <link rel="stylesheet" href="assets/css/meanmenu.css">
    <!-- Nice Select CSS -->
    <link rel="stylesheet" href="assets/css/nice-select.css">
    <!-- Odometer CSS-->
    <link rel="stylesheet" href="assets/css/odometer.css">
    <!-- Style CSS -->
    <link rel="stylesheet" href="assets/css/style.css">
    <!-- Responsive CSS -->
    <link rel="stylesheet" href="assets/css/responsive.css">
    
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" integrity="sha512-iecdLmaskl7CVkqkXNQ/ZH/XLlvWZOJyj7Yy7tcenmpD1ypASozpmT/E0iPtmFIB46ZmdtAc9eNBvH0H/ZpiBw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <!-- Favicon -->
    <link rel="icon" type="image/png" href="assets/img/favicon.png">

    <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>

    <!-- TITLE -->
    <title> Unfast Logistics Delivery Company - Unfast Logistics Delivery Company & Delivery Company</title>
</head>

<body>
    <!-- Start Preloader Area -->
    <div class="preloader">
        <div class="lds-ripple">
            <div></div>
            <div></div>
        </div>
    </div>
    <!-- End Preloader Area -->
    </div>
    <!-- Start Header Area -->
    <header class="header-area">
        <!-- Start Top Header Area -->
        <div class="top-header">
            <div class="container">
                <div class="row">
                    <div class="col-lg-3">
                        <div class="header-left-content">
                            <a href="/">
                                <img src="../assets/img/logo/logo-one.png" alt="Logo">
                            </a>
                        </div>
                    </div>
                    <div class="col-lg-9">
                        <div class="header-right-content">
                            <ul>
                                <li>
                                    <a href="tel:+1(601)980-1178">
                                        <i class='bx bxs-phone-call'></i>
                                        <span>+1(601)980-1178</span>

                                       
                                       
                                    </a>
                                </li>
                                <li>
                                    <a href="mailto:info@unfastlogisticsdelivery.com">
                                        <i class='bx bx-envelope'></i>
                                        <span>info@unfastlogisticsdelivery.com</span>
                                    </a>
                                </li>
                                <li class="pl-0">
                                    <ul class="flag-wrap">
                                        <li class="flag-item-top">
                                            <a href="#" class="flag-bar">
                                                <img src="assets/img/flag/1-united-states.png" alt="Image">
                                                <span>EN</span>
                                            </a>
                                            <!-- <ul class="flag-item-bottom">
                                                <li class="flag-item">
                                                    <a href="#" class="flag-link">
                                                        <img src="assets/img/flag/2-united-kingdom.png" alt="Image">
                                                        United Kingdom
                                                    </a>
                                                </li>
                                                <li class="flag-item">
                                                    <a href="#" class="flag-link">
                                                        <img src="assets/img/flag/3-germany.png" alt="Image">
                                                        Germany
                                                    </a>
                                                </li>
                                                <li class="flag-item">
                                                    <a href="#" class="flag-link">
                                                        <img src="assets/img/flag/4-argentina.png" alt="Image">
                                                        Argentina
                                                    </a>
                                                </li>
                                                <li class="flag-item">
                                                    <a href="#" class="flag-link">
                                                        <img src="assets/img/flag/5-australia.png" alt="Image">
                                                        Australia
                                                    </a>
                                                </li>
                                                <li class="flag-item">
                                                    <a href="#" class="flag-link">
                                                        <img src="assets/img/flag/7-canada.png" alt="Image">
                                                        Canada
                                                    </a>
                                                </li>
                                                <li class="flag-item">
                                                    <a href="#" class="flag-link">
                                                        <img src="assets/img/flag/6-new-zealand.png" alt="Image">
                                                        New Zealand
                                                    </a>
                                                </li>
                                            </ul> -->
                                        </li>
                                    </ul>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- End Top Header Area -->

        <!-- Start Prevoz Navbar Area -->
        <div class="prevoz-nav-style">
            <div class="navbar-area">
                <!-- Menu For Mobile Device -->
                <div class="mobile-nav">
                    <a href="/" class="logo">
                        <img src="../assets/img/logo/logo-one.png" alt="Logo">
                    </a>
                </div>
                <!-- Menu For Desktop Device -->
                <div class="main-nav">
                    <nav class="navbar navbar-expand-md navbar-light">
                        <div class="container">
                            <a class="navbar-brand" href="/">
                                <img src="../assets/img/logo/logo-one.png" alt="Logo">
                            </a>
                            <div class="collapse navbar-collapse mean-menu" id="navbarSupportedContent">
                                <ul class="navbar-nav mr-auto">
                                    <li class="nav-item">
                                        <a href="/" class="nav-link dropdown-toggle active">
                                            Home
                                        </a>
                                    </li>
                                    <li class="nav-item">
                                        <a href="about.php" class="nav-link dropdown-toggle">
                                            About Us
                                        </a>

                                    </li>
                                    <li class="nav-item">
                                        <a href="services.php" class="nav-link dropdown-toggle">
                                            Services
                                        </a>
                                    </li>
                                    <li class="nav-item">
                                        <a href="track.php" class="nav-link dropdown-toggle">
                                            Track Parcel

                                        </a>
                                    </li>
                                    <li class="nav-item">
                                        <a href="contact.php" class="nav-link">Contact</a>
                                    </li>
                                </ul>
                                <!-- Start Other Option -->
                                <div class="others-option">
                                    
                                    <button type="button" class="sidebar-menu" data-toggle="modal"
                                        data-target="#myModal2">
                                        <i class="flaticon-menu"></i>
                                    </button>
                                </div>
                                <!-- End Other Option -->
                            </div>
                        </div>
                    </nav>
                </div>
            </div>
        </div>
        <!-- End Prevoz Navbar Area -->
    </header>
    <!-- End Header Area -->
    <!--Start of Tawk.to Script-->
<script type="text/javascript">
var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date();
(function(){
var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0];
s1.async=true;
s1.src='https://embed.tawk.to/66eadf2e4cbc4814f7da2983/1i82nfk4k';
s1.charset='UTF-8';
s1.setAttribute('crossorigin','*');
s0.parentNode.insertBefore(s1,s0);
})();
</script>
<!--End of Tawk.to Script-->