Jump to content

Contact Form Problem


JP

Recommended Posts

I'm trying to set up a simple contact form. I found a site with simple cut and paste for both my form as well as the php.  If you go to my site - http://www.coldwaterschools.org/b-ball/MailingList.php you will see the problem.  I'm not sure if my coding is wrong or if there is a problem on the server itself.  Under sendmail_ etc. the PHP page has no value as the parameter.  Any help would be appreciated.  You can see the PHP under http://www.coldwaterschools.org/b-ball/test.php

Thanks for any help that may be given.

jp

Link to comment
https://forums.phpfreaks.com/topic/116637-contact-form-problem/
Share on other sites

I assume it is because you see the php code when you hit submit?  Make sure that:

 

<?php


// Contact subject
$subject ="$subject"; 
// Details
$message="$detail"; 

// Mail of sender
$mail_from="$customer_mail"; 
// From 
$header="from: $name <$mail_from>"; 

// Enter your email address
$to ='[email protected]'; 

$send_contact=mail($to,$subject,$message,$header);

// Check, if message sent to your email 
// display message "We've received your information"
if($send_contact){
echo "We've received your contact information";
}
else {
echo "ERROR";
}
?>

 

is the only thing that is in the file. 

Link to comment
https://forums.phpfreaks.com/topic/116637-contact-form-problem/#findComment-599700
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.