Page 1 of 1

Mailing form

Posted: Wed Aug 11, 2004 10:15 pm
by jslick
I have been using the same contact form for quite a while now. But I can't figure out to use HTML with it. So, I guess my question would be how do you mail an HTML email using PHP?

Posted: Wed Aug 11, 2004 10:41 pm
by feyd
generally, setting content-type in the headers sent to the mail function

Posted: Wed Aug 11, 2004 10:42 pm
by nigma
read the comments on the mail() manual entry at php.net
http://us4.php.net/manual/en/ref.mail.php

I think that should help. You'll see what feyd is talking about.

Posted: Wed Aug 11, 2004 11:05 pm
by jslick
Thanks, I got it working.

Really, really stupid question: How do you count how many bytes are in a variable?

(I wrote this in the same thread because it is related to the same script)

Posted: Wed Aug 11, 2004 11:10 pm
by feyd
[php_man]strlen[/php_man]() if it's a string..

Posted: Wed Aug 11, 2004 11:16 pm
by jslick
feyd wrote:[php_man]strlen[/php_man]() if it's a string..
Thanks again, feyd.

Posted: Wed Aug 11, 2004 11:46 pm
by nigma
If you cast an int as a string and then run it through strlen() do you get a correct byte count?

Posted: Wed Aug 11, 2004 11:50 pm
by feyd
for the number of digits in the integer yes.. for the number of bytes that integer used originally, no. However, the original int most likely took 8 bytes, as php supports up to 64-bit ints. Although the actual byte usage may vary, depending on how php optimizes it for memory..