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
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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.