Here’s the script as I’ve edited it from the template. The only things I’ve changed are what it says should be edited. I’ve received the test emails i’ve sent through the form attached to the mailer, just that I don’t know why the redirect doesn’t work.
the signup page is here: [url]www.sewa-ashram.org/signup.html
p.s that website is being reconstructed – the terrible html is not my handiwork!
[code=php]<?PHP
#######################################################
# This script is Copyright 2003, Infinity Web Design #
# Distributed by http://www.webdevfaqs.com #
# Written by Ryan Brill – [email protected] #
# All Rights Reserved – Do not remove this notice #
#######################################################
## The lines below need to be edited…
###################### Set up the following variables ######################
#
$to = “email@domain”; #set address to send form to
$subject = “Newsletter Signup”; #set the subject line
$headers = “From: Form Mailer”; #set the from address, or any other headers
$forward = 1; # redirect? 1 : yes || 0 : no
$location = “http://www.sewa-ashram.org/index.html”; #set page to redirect to, if 1 is above
#
##################### No need to edit below this line ######################
## set up the time ##
$date = date (“l, F jS, Y”);
$time = date (“h:i A”);
## mail the message ##
$msg = “Below is the result of your feedback form. It was submitted on $date at $time.nn”;
if ($_SERVER[‘REQUEST_METHOD’] == “POST”) {
foreach ($_POST as $key => $value) {
$msg .= ucfirst ($key) .” : “. $value . “n”;
}
}
else {
foreach ($_GET as $key => $value) {
$msg .= ucfirst ($key) .” : “. $value . “n”;
}
}
mail($to, $subject, $msg, $headers);
if ($forward == 1) {
header (“Location:$location”);
}
else {
echo “Thank you for submitting our form. We will get back to you as soon as possible.”;
}
?>