Subscribe/Unsubscribe app

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
Dean099
Forum Newbie
Posts: 3
Joined: Mon Jul 07, 2008 7:55 am

Subscribe/Unsubscribe app

Post by Dean099 »

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