setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); echo "Connected successfully"; // search for the email address in the database and delete it $fields = array( itemid => "", username => "NameofPerson", emailaddress => "e_address", ConfirmationCode => "ConfirmationCode", Confirmation => "Confirmation" ); $result="SELECT emailaddress FROM 'ecovibdc_Subscribers.subscribers' VALUES($fields)"; $result= $conn->query($result); if($result!=null){ $conn->query("DELETE FROM 'ecovibdc_Subscribers'.'subscribers' WHERE emailaddress = $Email_Address") OR die(mysql_error()); } } catch(PDOException $e) { echo "Error Message: " . $e->getMessage(); $line3 = " Back to my blog - Try again !" ; echo $line3; } } ?> Unsubscribe from ECOVIB2D© window.location='https://ecovib2d.blogspot.com.au'"; echo $new_win; } else if ($Value == "Unsubscribe"){ Delete($Email); $new_win2 = ""; echo $new_win2; } $conn = null; ?>