Mercurial > hg > ywww
comparison user/unsubscribe.php @ 6:077b0a0a3e6d
remaining originals according to dependency walk
| author | Robert Boland <robert@markup.co.uk> |
|---|---|
| date | Thu, 16 Feb 2017 22:29:02 +0000 |
| parents | |
| children | 385ddd7c4b55 a67bf725e87b |
comparison
equal
deleted
inserted
replaced
| 5:55445b456ad0 | 6:077b0a0a3e6d |
|---|---|
| 1 <?PHP | |
| 2 | |
| 3 $email = strval($_GET['email']); | |
| 4 | |
| 5 include "../../private/db.php"; | |
| 6 | |
| 7 $query = "update userpref set ReceiveEmail = 0 where UserID in (select UserID from user where Email = '$email') "; | |
| 8 $results = mysqli_query($link, $query); | |
| 9 | |
| 10 if ( $results ) | |
| 11 { | |
| 12 $redirectURL = "unsubscribe.html"; | |
| 13 header("Location:$redirectURL"); | |
| 14 } | |
| 15 else{ | |
| 16 echo "<p>Error updating preferences. Please email <a href=\"mailto:feedback@yournextread.com?subject=Unsubscribe Problem\">feedback</a></p>"; | |
| 17 } | |
| 18 | |
| 19 mysqli_close($link); | |
| 20 | |
| 21 ?> |
