Log in

View Full Version : Resolved Removal of brackets



20pictures
08-02-2009, 12:18 AM
I can't get this to work:



$db->execute_query("UPDATE mail_subscribers SET bounce_count='bounce_count + 1' WHERE email = '$email'");


I believe it is because the email values do not match:
email = nobody@mydomain.com
$email = <nobody@mydomain.com>

This is because $email was taken from a header by a MIMEdecoder.
How can I remove the brackets (tags)?

20pictures
08-02-2009, 10:17 AM
I figured it out:


$emailx = trim($email, "<>");
$db->execute_query("UPDATE mail_subscribers SET bounce_count=bounce_count+1 WHERE email = '$emailx'");