okay I am new and very inexperienced and I have this mail form I want to do that someone at one time actually post the code to on here. The problem I am having with it is it doesn't send all the content of the form, and if I enter in an email address with out "@" it still send it saying mail sent successfully.
NOW if I only specify a couple of the fields from the form for some reason it sends them but if I soecify all the fields on the form it doesn't send a thing here is the code from the form:
<form name="email" action="mail.php" method="post">
<div align="left">
<input type="name" name="name">
<font color="#FFFFFF">Name</font><br>
<br>
<input type="email" name="email">
<font color="#FFFFFF">E-Mail</font><br>
<br>
<input type="subject" name="subject">
<font color="#FFFFFF"> Subject</font><br>
<br>
<font color="#FFFFFF"> Comment</font><br>
<textarea name="comment" cols="45" rows="8"></textarea>
<br>
<br>
<input type="submit" name="Submit" value="Submit" class="textwhite">
</div>
</form>
I hope I posted that right.
and here is the PHP from mail.php that it goes to after you hit submit:
<?php
//The mail script --- "mail.php"
$to = "oliver.kelso@comcast.net";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "Wrom: CMHVIBGDADRZFSQHYUCDDJBLVLMH
$mail = @mail($to,$_POST['subject'],$_POST['comment'],$headers);
// The "@" sign before the mail() call suppresses printing of errors
// that may occur. The test below will check for errors instead:
if(!$mail){
echo "Email not sent! Please try again!";
}else{
echo "Mail sent successfully! We will contact as soon as possible Thank You!";
}
?>
I am very new to this so I just wasn't able to figure it out. I was happy it actually sent me an email LMAO.
Thanks for the help PHP Junkies!
EDIT: actually when I tell it to send all fields then it echoes to me that it wasn't sent and to retry