PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
marcisconsulting
Forum Newbie
Posts: 1 Joined: Thu Jul 23, 2009 10:16 am
Post
by marcisconsulting » Thu Jul 23, 2009 10:20 am
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";
}
?>
Last edited by
Benjamin on Thu Jul 23, 2009 2:14 pm, edited 1 time in total.
Reason: Added [code=php] tags.
marty pain
Forum Contributor
Posts: 105 Joined: Thu Jun 11, 2009 5:32 am
Location: Essex
Post
by marty pain » Thu Jul 23, 2009 10:25 am
What do you mean by "It stops working"?
Benjamin
Site Administrator
Posts: 6935 Joined: Sun May 19, 2002 10:24 pm
Post
by Benjamin » Thu Jul 23, 2009 2:15 pm
Moved to PHP - Code