PHP Form Issues

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

Post Reply
marcisconsulting
Forum Newbie
Posts: 1
Joined: Thu Jul 23, 2009 10:16 am

PHP Form Issues

Post 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";
}
?>
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

Re: PHP Form Issues

Post by marty pain »

What do you mean by "It stops working"?
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: PHP Form Issues

Post by Benjamin »

:arrow: Moved to PHP - Code
Post Reply