website does not retrieve data from my database
This is my php <?php session_start(); if (!isset($_SESSION['user'])) if (!isset($_POST['user'])); $_SESSION['authuser'] = 0; include'Connections/config.php'; if (isset($_POST['pdata'])) { $pdata = $_POST['pdata']; } { // Check if data has be sent $connection = mysqli_connect($db_host,$username,$password, $databaseName); if (!$connection) { die("Database connection failed: " . mysqli_connect_error()); } // 2. Select a database to use $connection = mysqli_connect($db_host,$username,$password, $databaseName); if (!$connection) { die("Database selection failed: " . mysqli_error($connection)); } $tbl_name="account"; // Table name $accountID = $_SESSION['user']; $sql= "SELECT * FROM WHERE `Tracking_ID`='".mysqli_real_escape_string($connection,$_POST['user'])."'"; $result=mysqli_query($connnection, $sql) or die(mysqli_error($connection)); $count = mysqli_num_rows($result); //Mysqli_num_row is counting table row //If result matched $myusername and $mypassword, table row must be 1 row echo $count; if($count==1){ $_SESSION[trackid] = $_POST[user]; echo '<meta http-equiv="refresh" content="0 URL=trackerror.html" />'; /*$_SESSION['authuser'] = 1; header ("Location:" . $_SESSION['redirect'] . ""); */ } else { /*// When tracking Number is Correct*/ session_unset(); // Get redirecting path if (isset($_POST['redirect'])) { $_SESSION[redirect] = $_POST['redirect']; } else { $_SESSION[redirect] = "tracking.php"; } } // check if data is send to DB ?>