Jump to content

deleteing from records


Mr P!nk

Recommended Posts

Ive created a mailing list using php3, and i'm trying to make an unsubscribe, so far i have it set up to mail me with the email of the person(s)  wishing to unsubscribe, and i have to do it manually.

 

what i want is a code that pulls the email address from te unsubscriber and deletes it from the list.

 

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>Untitled Document</title>

<link href="includes/global.css" rel="stylesheet" type="text/css" />

</head>

 

<body class="bodyTextGreen">

<div align="center">

    <p>

        <?php

// Compose Mail

$myname = "$contact";

$myemail = "$email";

 

$contactname = "";

$contactemail = "";

//$contactemail = "";

$enquiry = nl2br($enquiry);

 

// Email

$message .= "<table><tr><td valign='top'><font color=\"#003366\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\"><b>email : </b></font></td>";

$message .= "<td valign='top'><font color=\"#666666\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">$email | Has Unsubscribed |</font></td></tr>";

 

// Subject

 

$subject = "*** UNSUBSCRIBE ***";

 

//Headers

$headers = "MIME-Version: 1.0\r\n";

$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";

$headers .= "From: ".$myname." <".$myemail.">\r\n";

$headers .= "To: ".$contactname." <".$contactemail.">\r\n";

 

// Send mail

mail($contactemail, $subject, $message, $headers);

?>

<?php

$delete="DELETE FROM $email WHERE  <\"data/$List\"";

?>

 

    <p>Thank you your data has been removed from our database.</p>

    <p>Home</p>

</div>

</body>

 

</html>

 

Thanks in advance

Link to comment
https://forums.phpfreaks.com/topic/57555-deleteing-from-records/
Share on other sites

also, with out using PHP Mailer , how do i mkae it so i can place images inside the mailout template,

whenever i recieve the test email i just get <img src=\"includes/logo copy.jpg\">

ive tried placing a html inside the php but i get error messages.

 

if you'd like to view what ive done http://acmeart.co.uk/lloydtest/mail/admin.php3

 

also the unsubscribe http://acmeart.co.uk/lloydtest/mail/unsubscribe.php3

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.