I have this piece of code that works in my forum and sends to someone by email when they sign up. I want to be able to add an image to these emails, where would I put the code in this part of the php code?
I echo $txt[700]
$txt[700] = 'Welcome to';
Can <img src="image"> be used here somehow?
If you want to use HTML tags in your emails, you'll have to send it as HTML. You can use the $header argument of the mail() function for this.
Here is an example: http://codewalkers.com/tutorials/72/2.html
$txt[700] = 'Welcome to ' & <img src="WE">;
Remember the space after to or it wont look right
Unfortunately this doesn't work. I've tried it and uploaded but it won't even load the pages.
Maybe something to do with the '' or ""?
You need to do this:
$txt[700] = "Welcome to <img src='link_to_image'>";
Also, I don't know why you are using $txt[700], unless you want an array with 700 seperate parts. Strings, in php, are not arrays of characters, like they are in C.
Unfortunately the text "welcome to <img src='img'> is exactly what sends through on the email. Is there maybe some way of echoing within this $txt[700]?
Are you still sending plain-text emails? Of course the HTML won't show up.
So any ideas what I need to do in order to get images showing up?
See the example at my post above. There are also examples in the PHP manual: http://us2.php.net/mail