Forum Moderators: coopster

Message Too Old, No Replies

PHP Form

         

krugi

3:50 pm on Sep 14, 2009 (gmt 0)

10+ Year Member



Hello everybody :)

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? :)

rocknbil

1:41 am on Sep 15, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's probably not that. Are you outputting a text/html header for the email? Short example:


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.

krugi

11:22 am on Sep 15, 2009 (gmt 0)

10+ Year Member



First of all, thanks.
Second thing- I'm not programming PHP.
I made this form using video tutorial,
So i don't really know what i need to do.
You have an iChat, MSN or skype accounts that we could talk?

krugi

6:47 am on Sep 18, 2009 (gmt 0)

10+ Year Member



It's not solved yet...
Any help?

jatar_k

3:17 pm on Sep 21, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



and if it has the text there but no values then maybe it's a register_globals issue and you are assigning blank variables into the message.

can you maybe show us the couple lines where you build your email body?

krugi

10:07 pm on Sep 26, 2009 (gmt 0)

10+ Year Member



Can you please explain in simple words,
and what exactly i need to do?
I'm not a php scripter, i made the form with a tutorial.