Hi, this is my first post and let me tell you I know nothing about php. I'm just getting my feet wet. Basically my designer is no longer around and I have to work with what he gave me.
I have a contact page on primevisual.com/wedding and primevisual.com/commercial
They were working on the same server I have now (bluehost) up until around may. I have no idea why, but all the sudden when someone submits the contact form it comes to my email blank(except ip), like this:
Message from
Name:
E-Mail:
Telephone:
Address:
Wedding Date:
Comments:
Additional Sender Information
IP Address:
Host: ip68-97-13-101.ok.ok.cox.net
User Agent:
This is after I've filled in al the fields in my browser. It gets mailed, but none of the info the client enters is viewable. It just isn't there.
I did get this error log on my server recently:
[10-Jun-2010 21:33:59] PHP Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home5/primevis/public_html/wedding/contact_form.php on line 71
I looked at line 71 in DW and it wasn't even active code, it was preceded by "//"
Here is the code:
<?php
/*
##########################################################
SWiSHmax Contact Form was created by Brian Ayers of Swish-Tutorials.com
Unless a Donation is made for these form files - this copyright should remain intact
To Customize this Form -- Please Read the Comments I've Added !
Be SURE to rename this file to: st_mailform_script.php if you use it
##########################################################
*/
// IMPORTANT NOTE: DO NOT change anything that has a $ before it
// Any line that has two slashes in front of it is a comment (and will be ignored by this script)
/
// In case register globals is off (backwards compatibility)
// If you add additional input text fields - you need to add them here as well
// for example, if you add a text field with a variable "Phone", add:
// $phone = $HTTP_POST_VARS['Phone'];
// Remember -- you would then also need to add them in the 'Remove Slashes' section
// as $phone (for example), and somewhere in the 'msg_body' below
// I have added this example in to the script below to help give you a guide
/
$message = $HTTP_POST_VARS['Message'];
$name = $HTTP_POST_VARS['Name'];
$name2 = $HTTP_POST_VARS['Name'];
$email = $HTTP_POST_VARS['Email'];
$telephone = $HTTP_POST_VARS['Telephone'];
$address = $HTTP_POST_VARS['Address'];
$wedding = $HTTP_POST_VARS['Wedding'];
// $phone = $HTTP_POST_VARS['Phone']; // example of an additional input field with a variable "Phone"
// Begin Censors
$message = eregi_replace('*', "flip", $message);
$message = eregi_replace('', "crap", $message);
$message = eregi_replace('****', "nice lady", $message);
$message = eregi_replace('ass', "butt", $message);
$message = eregi_replace('piss', "pee", $message);
// End Censors
// Remove Slashes Inserted by PHP
$name = stripslashes($name);
$email = stripslashes($email);
$telephone = stripslashes($telephone);
$address = stripslashes($address);
$message = stripslashes($message);
$date = stripslashes($date);
// $phone = stripslashes($phone); // example of an additional input field
// Start Customizable Email Information
// Change the information in quotes below to fit your needs
$rec_email = "info@primevisual.com"; // who do you want to send this email to
$subject = "Submission from primevisual.com/wedding"; // this is the subject line of the email
// End Customizable Email Information
// The Body of the Email message
// You can customize the email you receive by changing the text inside the quotes below
// The code "\n" (without quotes) will add a new line in the email body
// Don't forget to add extra '$msg_body .='
// for each additional input field you have added to your form
// IMPORTANT NOTE: DO NOT change anything that has a $ before it
$msg_body = "Message from $SERVER_NAME\n";
//$msg_body .= $name2;
$msg_body .= "**************************************\n";
$msg_body .= "Name: $name\n";
$msg_body .= "E-Mail: $email\n";
$msg_body .= "Telephone: $telephone\n";
$msg_body .= "Address: $address\n";
$msg_body .= "Wedding Date: $wedding\n";
$msg_body .= "Comments: $message\n";
// $msg_body .= "Phone: $phone\n"; // an example of an additional input field
$msg_body .= "***********************************\n";
$msg_body .= "\n\n";
$msg_body .= "Additional Sender Information\n";
$msg_body .= "**************************************\n";
$msg_body .= "IP Address: $REMOTE_ADDR\n";
$HostName = gethostbyaddr($_SERVER['REMOTE_ADDR']);
$msg_body .= "Host: $HostName\n";
$msg_body .= "User Agent: $HTTP_USER_AGENT\n";
// Add Some Extra Header Information to the Mail
$header_info = "From: ".$name." <".$email.">";
// Now let's take the information above and mail it to the recipient
mail($rec_email, $subject, $msg_body, $header_info);
/*
##########################################################
SWiSHmax Contact Form was created by Brian Ayers of Swish-Tutorials.com
Unless a Donation is made for these form files - this copyright should remain intact
##########################################################
*/
?>
ANY help would be greatly appreciated!