Hey All~
I am a n00b and looking for some help, please. I am using the Kirupa PHP Mailer, but my server is posting errors on “submit”. Here’s what i have so far:
My HTML form is formatted thusly:
<form method=“POST” action=“mailer.php” style=“background: url(images/portbkg3.gif) no-repeat; padding: 30px; border: 1px;”><br />
Name:
<input type=“text” name=“name” size=“29”><br>
E-Mail:
<input type=“text” name=“email” size=“29”><br>
<br>
<strong>First visit to loydster.com?</strong><br /><input type=“radio” value=“yes” name=“radio”> YES <input type=“radio” value=“no” name=“radio”> NO
<br><br />
<strong>What is the nature of your query?</strong><br />
<input type=“checkbox” name=“check[]” value=“opportunity”> Opportunity <input type=“checkbox” name=“check[]” value=“quote”> Quote
<input type=“checkbox” name=“check[]” value=“comment”> Comment<br>
<br>
<select size=“1” name=“drop_down”>
<option>Please select your area of interest:</option>
<option>Website Design</option>
<option>UI Design</option>
<option>Graphic Design</option>
<option>Technical Writing or Quality Analysis</option>
</select><br>
<br>
<strong>Message:</strong><br>
<textarea rows=“7” name=“message” cols=“30”></textarea><br>
<br>
<input type=“submit” value=“Submit” name=“submit”><br /><br />
</form>
The form resides on my server www.loydster.com and the SERVER PHP FILE contains this information:
<?php
if(isset($_POST[‘submit’])) {
$to = “loydster@comline.com”;
$subject = “Inquiry or Comment”;
$name_field = $_POST[‘name’];
$email_field = $_POST[‘email’];
$message = $_POST[‘message’];
$option = $_POST[‘radio’];
$dropdown = $_POST[‘drop_down’];
foreach($_POST[‘check’] as $value) {
$check_msg .= "Checked: $value
";
}
$body = "From: $name_field
E-Mail: $email_field
$check_msg Option: $option
Drop-Down: $dropdown
Message:
$message
";
echo “Thank you for contacting $to!”;
mail($to, $subject, $body);
} else {
echo “Error on email posting.”;
}
?>
When I post from my Web page, I get the following ERROR MESSAGE:
Notice: Undefined variable: check_msg in d:\Customers\user1220675\www\mailer.php on line 13
Thank you for contacting loydster@comline.com!
Warning: mail(): SMTP server response: 553 5.3.0 <me@localhost.com>… DISCARD Spam Relay in d:\Customers\user1220675\www\mailer.php on line 19
The code looks good (to me) and I am wondering if this is a “permissions” issue? Any help is greatly appreciated. And thanks in advance.:pac: