Click to See Complete Forum and Search --> : Processer


Jonathan
07-11-2003, 01:01 PM
I am having a problem with a script pyro gave me... This form works for only the Feedback on my site... www.crosspoint.org/feedback.html But, when I link my Registration to this script it doesn't work. Why is that?

<?PHP

$subject = "Feedback";
$headers = "From: Form Mailer";
$forward = 1;
$location = "feedbackthankyou.html";
$addresses = array("webmaster@crosspoint.org","dvaughan@crosspoint.org","lhale@crosspoint.org");

$date = date ("l, F jS, Y");
$time = date ("h:i A");

$msg = "This form was submitted on $date at $time.\n\n";

foreach ($_POST as $key => $value) {
$msg .= ucfirst ($key) ." : ". $value . "\n";
}

foreach ($addresses as $email) {
mail($email, $subject, $msg, $headers);
}
if ($forward == 1) {
header ("Location:$location");
}
else {
echo ("Thank you for submitting our form.");
}

?>

pyro
07-11-2003, 01:20 PM
Two things to check. Are you linking to the file right? ie. using the right path and fine name in the forms action and are you using the POST method? This script requires that you use POST.

Jonathan
07-11-2003, 01:40 PM
Was that you who just sent the feedback? and, i thought you were supposed to do this

<form name="something" action="name_of_php_file.php">