Hello.
I'm dealing with a hosting company that has registered_globals turned off by default. My script runs fine on other servers. Please look at the script below. Any suggestions are much appreciated; my client is bugging me.
Here's what the hosting company said about this:
'The problem lies with the script. In
addition, for your form to work with mail correctly, your script must have a
way to indicate the path to sendmail, which is the $mailprog, which
eventually handles all mail that originates from the server. If you are not
doing any php coding that pertains to using global variables
(registered_globals turned off by default) then you will have some problems
because the registered_globals variable is turned off by default on this
plan.'
Ivan
<?
/* subject */
$subject = "QUOTE REQUEST";
/* additional header pieces for errors, From cc's, bcc's, etc */
$headers = "From: $fname $lname <$email>\n";
$headers .= "X-Sender: <$email>\n";
$headers .= "X-Mailer: PHP\n"; // mailer
$headers .= "X-Priority: 1\n"; // Urgent message!
$headers .= "Return-Path: $fname $lname <$email>\n"; // Return path for errors
/* recipients */
$recipient = "ivan@foundation-one.net";
/* and now mail it */
mail($recipient, $subject, "Hello,\nMy name is $fname $lname.\nMy phone number is $phone.\nMy e-mail is $email.\nMy comments: $comments.\nThis is how we heard about you: $question.", $headers);
echo "<META http-EQUIV=\"refresh\" CONTENT=\"0;URL=http://www.foundation-one.net/Bulldog\">";
// Replay
// ---------------------------
/* subject */
$subject = "Bulldog Movers Inc";
/* additional header pieces for errors, From cc's, bcc's, etc */
$headers = "From: Bulldog Movers Inc <ivan@foundation-one.net>\n";
$headers .= "X-Sender: <ivan@foundation-one.net>\n";
$headers .= "X-Mailer: PHP\n"; // mailer
$headers .= "X-Priority: 1\n"; // Urgent message!
$headers .= "Return-Path: Quote Request Reply <ivan@foundation-one.net>\n"; // Return path for errors
/* recipients */
$recipient = $email;
/* message */
$message = "Dear $fname $lname,
Thank you so much for contacting Bulldog Movers, Inc. regarding your relocation. Please rest assured that a Bulldog Movers representative will contact you immediately.
Sincerely,
Bulldog Movers, Inc.
5080 Highlands Parkway
Suite A1
Atlanta, GA 30082
info@bulldogmovers.net
(770) 333.8100";
mail($recipient, $subject, $message, $headers);
?>
I'm dealing with a hosting company that has registered_globals turned off by default. My script runs fine on other servers. Please look at the script below. Any suggestions are much appreciated; my client is bugging me.
Here's what the hosting company said about this:
'The problem lies with the script. In
addition, for your form to work with mail correctly, your script must have a
way to indicate the path to sendmail, which is the $mailprog, which
eventually handles all mail that originates from the server. If you are not
doing any php coding that pertains to using global variables
(registered_globals turned off by default) then you will have some problems
because the registered_globals variable is turned off by default on this
plan.'
Ivan
<?
/* subject */
$subject = "QUOTE REQUEST";
/* additional header pieces for errors, From cc's, bcc's, etc */
$headers = "From: $fname $lname <$email>\n";
$headers .= "X-Sender: <$email>\n";
$headers .= "X-Mailer: PHP\n"; // mailer
$headers .= "X-Priority: 1\n"; // Urgent message!
$headers .= "Return-Path: $fname $lname <$email>\n"; // Return path for errors
/* recipients */
$recipient = "ivan@foundation-one.net";
/* and now mail it */
mail($recipient, $subject, "Hello,\nMy name is $fname $lname.\nMy phone number is $phone.\nMy e-mail is $email.\nMy comments: $comments.\nThis is how we heard about you: $question.", $headers);
echo "<META http-EQUIV=\"refresh\" CONTENT=\"0;URL=http://www.foundation-one.net/Bulldog\">";
// Replay
// ---------------------------
/* subject */
$subject = "Bulldog Movers Inc";
/* additional header pieces for errors, From cc's, bcc's, etc */
$headers = "From: Bulldog Movers Inc <ivan@foundation-one.net>\n";
$headers .= "X-Sender: <ivan@foundation-one.net>\n";
$headers .= "X-Mailer: PHP\n"; // mailer
$headers .= "X-Priority: 1\n"; // Urgent message!
$headers .= "Return-Path: Quote Request Reply <ivan@foundation-one.net>\n"; // Return path for errors
/* recipients */
$recipient = $email;
/* message */
$message = "Dear $fname $lname,
Thank you so much for contacting Bulldog Movers, Inc. regarding your relocation. Please rest assured that a Bulldog Movers representative will contact you immediately.
Sincerely,
Bulldog Movers, Inc.
5080 Highlands Parkway
Suite A1
Atlanta, GA 30082
info@bulldogmovers.net
(770) 333.8100";
mail($recipient, $subject, $message, $headers);
?>