Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function unsubscribe($email_id, $created_at){
- $servername1 = "name";
- $username1 = "name";
- $password1 = "pass";
- $dbname1 = "dbName";
- // Create connection
- $conn1 = mysqli_connect($servername1, $username1, $password1, $dbname1);
- // Check connection
- if (!$conn1) {
- die("Connection failed: " . mysqli_connect_error());
- }
- $timestamp = strtotime($created_at);
- $sql = "update email_list set unsubscribed = '" . $timestamp . "' where emailaddress = '" . $email_id . "'";
- echo "OnServer Date = " . $created_at . " and Timestamp = " . $timestamp . " and email = " . $email_id . "<br>";
- mysqli_query($conn1, $sql);
- mysqli_close($conn1);
- }
Add Comment
Please, Sign In to add comment