Page 1 of 1

PHP Form Issues

Posted: Thu Jul 23, 2009 10:20 am
by marcisconsulting
can someone please debug this code? It seems to work, then just stop working after a few hours...
Thanks in advance!

Code: Select all

 
<?php
// Message
$message =  $_POST['name'] . " contacted you from your site \n\n" 
. "E-Mail: " . $_POST['email'] . "\n\n"
. "Phone Number: " . $_POST['phone'] . "\n\n"
. "City, State: " . $_POST['city'] . "\n\n"
. "Company: " . $_POST['company'] . "\n\n"
. "Interested In: " . $_POST['interest'] . "\n\n"
. "Questions: " . $_POST['questions'] . "\n\n";
 
// Mail of sender
$email = $_POST['email'];
$mail_from="$email";
 
// From
$headers="from: $name <$mail_from>";
 
// Enter your email address
$to ='contact@marcisconsulting.com';
 
// Subject
$subject = "Contact Submission From Marcis Interactive";
 
$send_contact=mail($to,$subject,$message,$headers);
 
// Check, if message sent to your email
// display message "We've received your information"
if($send_contact){
echo "";
}
else {
echo "ERROR";
}
?>

Re: PHP Form Issues

Posted: Thu Jul 23, 2009 10:25 am
by marty pain
What do you mean by "It stops working"?

Re: PHP Form Issues

Posted: Thu Jul 23, 2009 2:15 pm
by Benjamin
:arrow: Moved to PHP - Code