
<?php
$host = 'localhost';
   $user = 'toptrendingappst_emailtrackingU';
   $password = 'emailtrackingP';
   $database = 'toptrendingappst_emailtrackingdb';
   $conn = mysqli_connect($host, $user, $password, $database);
  if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
  }
  

if(isset($_GET['uid'])) {

  echo "Result Ok";
  
   $sql = "INSERT INTO tracking_data (uid, email, event_type) VALUES ('1', 'xyz@gmail.com', 'open')";
  if ($conn->query($sql) === TRUE) {
  echo "Result executed";
  } else {
    echo "Error: " . $sql . "<br>" . $conn->error;
  }

  // Close database connection
  $conn->close();

} else {
  echo "Error: email and uniqueId parameters are required";
}

?>

