if($_GET['type'] == 'click') { $email = $_GET['email']; $address = $_GET['address']; $url = $_GET['url']; // Get Worker Email $sql = mysqli_query($con, "SELECT * FROM worker_emails WHERE id='$email'"); $row = mysqli_fetch_array($sql); // Unserialize Array $array = unserialize($row['clicks']); // Update Array $array[''.$address.'']['Clicks'] = $array[''.$address.'']['Clicks'] + 1; // Serialize Array $array = serialize($array); // Update Click Tracking mysqli_query($con, "UPDATE worker_emails SET clicks='$array' WHERE id='$email'"); // Send User to Link header("Location: ".$url); }