Forum Moderators: coopster
I'm working a form (my first time actually, this is the reason for all of my topics about forms) and i want it to send the message directly.
So i found tutorial that helped me a-lot.
Everything is good, but when i get the message,
i don't have the details of the form.
It like didn't took the thing i wrote at the form,
it just shows the "Email: ", "Name:", "Phone: "and things like this.
The DTD of the HTML with the form is:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
help? :)
function send_mail($to,$from,$email_subj,$emailbody) {
// To send HTML mail, the Content-type header must be set
//Also a FROM field is required or it comes from anonymous.
$headers = "From: $from\r\n"; // Preformat as "company" <email>
$headers .= 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Mail it
mail($to, $email_subj, $emailbody, $headers);
}
If you're already doing that, it's probably an error in your code output for the email, most likely, a missed quote. Send yourself an email in some email client that you can view the source of the email (most can.)
This
<td>Email</td><td align="left>blah@example.com</td></tr>
Will very likely cause everything after the first TD to disappear, note missing quote. Sometimes clients can sort it out, sometimes they can't.