15 posts
|
Hi,
Anybody know how to include, (and get working), the $_POST[email]; in the code below please? I have added a confirmation email to the Simple Newsletter plugin but it doesn’t seem to pick up the $_POST[email]; bit.
if($_GET['success']==1){
echo '<div class="simple_message">'.__("You have successfully subscribed.").'</div>';
// email notification to Customer
$to = $_POST[email];
$from = "arkiris <info@arkiris.co.uk>";
$subject = "arkiris - Subscription Confirmation";
$body='
<img src="http://www.arkiris.co.uk/public/images/arkiris-logo.gif"><br><br>
<p>
Dear Subscriber<br /><br />
Thank you for subscribing to arkiris.<br /><br />
We will keep you up to date with the latest information about arkiris.
</p>
';
$headers = "From: $from";
$semi_rand = md5( time() );
$mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";
$headers .= "\nMIME-Version: 1.0\n" .
"Content-Type: multipart/mixed;\n" .
" boundary=\"{$mime_boundary}\"";
$message = "This is a multi-part message in MIME format.\n\n" .
"--{$mime_boundary}\n" .
"Content-Type: text/html; charset=\"iso-8859-1\"\n" .
"Content-Transfer-Encoding: 7bit\n\n" .
$body . "\n\n";
mail( $to, $subject, $message, $headers );
$message='Your message has been successfully submitted.<br>You will shortly receive email confirmation of your message to the email address provided.';
}else{
if(isset($_GET['error']))echo '<div class="simple_message">'.__('Please fill out the required fields.').'</div>';
echo '<form class="simple_form" method="post" action="'.URL_PUBLIC.'frog/plugins/newsletter/unsubscribe.php">
<fieldset>
<label id="name">'.__('Name').'</label><input type="text" name="name" title="Name" class="text" /><br />
<label id="email">'.__('Email').'</label><input type="text" name="email" title="Email" class="text" /><br />
<input type="submit" value="'.__('Subscribe').'" name="subscribe" class="submit" />
</fieldset></form>';
}
|
108 posts
|
Try replacing:
$to = $_POST[email];
with
$to = $_POST['email'];
|
15 posts
|
Lol, had the confirmation code in the wrong page! Should have been in unsubscribe.php! Now works like a treat. |