I am building a subscribe/unsubscribe app in PHP with Dreamweaver CS3.
I am following step by step the article on
http://www.adobe.com/devnet/dreamweaver ... h_php.html
On page 4 of this article, I used the following code:
<?php
$id = $row_rsSubscriber['ID'];
$to = $row_rsSubscriber['SubEmail'];
$subject = "Subscription confirmation";
$body = "<html><body>" .
"<h2>Thank you for subscribing to our newsletter!</h2>" .
"<p>To unsubscribe, click <a href=\"http://[MY SERVER & PATH HERE]/confirm_unsubscribe.php?ID=" .
$id . "\">here</a>.</p>" . "</body></html>";
$headers = "From: Subscription Manager <amanda099@gmail.com>\r\n" .
"MIME-Version: 1.0\r\n" .
"Content-type: text/html; charset=UTF-8";
if (!mail($to, $subject, $body, $headers)) {
header( 'Location: http://[MY SERVER & PATH HERE]/error_subscribe.php' ) ;
}
?>
When I test the application ( publishing the pages to m web server, going to subscribe.php and entering my e-mail address ) , I was taken to the error page: http://[MY SERVER & PATH HERE]/error_subscribe.php
I know that the e-mail function in the above code didn't work properly (I have checked all other possibilities)
Please help ! How to debug !
Amanda Nguyen
Subscribe/Unsubscribe app
Moderator: General Moderators