Hi all you PHP gurus,
I did the ultimate today, yep, I totally stepped in it. I have a feedback form on this web site and it was working until I accidentally deleted something, but I'm not quite sure what. The form no longer seems to be processing and sending my results. If you type out the form and hit submit, all you get is a blank form. Can someone be so kind as to look at the code and help me find what happened?
The feedback form is located at: http://www.catchafirefly.net/contact_us.html
The code that processes the form:
<?php
/ SEND EMAIL FUNCTIONS /
//Authenticate Send - 21st March 2005
//This will send an email using auth smtp and output a log array
//logArray - connection,
require("class.phpmailer.php");
$smtpServer = "mail.catchafirefly.net";
$port = "25";
$timeout = "30";
$username = "XXXXXXX@catchafirefly.net";
$password = "XXXXXXXX";
$localhost = "localhost";
$newLine = "\r\n";
$mail = new PHPMailer();
$mail->IsSMTP(); // send via SMTP
$mail->Host = $smtpServer; // SMTP servers
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = $username; // SMTP username
$mail->Password = $password; // SMTP password
$mail->From = $_POST["email"];
$mail->FromName = $_POST["name"];
$mail->Phone = $_POST["phone_no"];
$mail->Website = $_POST["website"];
$mail->Interested_in = $_POST["Interested_in"];
$mail->Time = $_POST["Time"];
$mail->Referred_by = $_POST["Referred_by"];
$mail->Mailing_list = $_POST["Mailing_list"];
$mail->AddAddress("XXXXXXX@catchafirefly.net",$username);
//$mail->addBCC($_POST["email"],$_POST["name"]);
$mail->WordWrap = 50; // set word wrap
$mail->IsHTML(true); // send as HTML
$mail->Subject = "Firefly Contact Form";
$mail->Body = "From:".$_POST["name"]."<br>Email:".$_POST["email"].
"<br>Phone number:".$_POST["phone_no"]."<br>Website:".$_POST["website"]."<br>Interested in:".$_POST["Interested_in"].
"<br>Time:".$_POST["Time"]."<br>Referred by:".$_POST["Referred_by"]."<br>Mailing list:".$_POST["Mailing_list"]."<br>Comments:".$_POST["Comments"];
if(!$mail->Send())
{
echo "<b>Your query was not sent. Please try again later.<b>";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}
else
echo "<b>Thank you for your interest in Firefly! Someone from our sales team will contact you within 2 business days.</b>";
?>
Thank you, thank you, thank you in advance for all help and insight..
:o