php code help needed

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ben_albrechts
Forum Commoner
Posts: 33
Joined: Wed Oct 26, 2005 3:33 am

php code help needed

Post by ben_albrechts »

How do i send images with the next url :

Code: Select all

"files/".$_FILES['imagefile']['name']
to my emailadress.

I have this :

Code: Select all

$message = "Message from $name ($email)\n\nTelephone\n\n$telephone\n\nAddress:\n\n$address\n\nDesign:\n\n$design\n\nColour Tshirt: $colour\n\nPrinted on $side\n\nSize:\n\n$size\n\nQuantity:\n\n$amount\n\nPayment:\n\n$payment\n\nComments:\n\n$comments";

            mail("order@pictureitprints.co.uk", "Order", "$message");

But I need to add that image in the email , or if impossible at least a link to the image and it isnt working.
Help please
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

The easiest is to use http://phpmailer.sf.net.
ben_albrechts
Forum Commoner
Posts: 33
Joined: Wed Oct 26, 2005 3:33 am

Post by ben_albrechts »

I dont understand any of that site. I'm new to this whole php thing.
There must be a simple way to just add a link to the image in the mail with the code that i already have?
duk
Forum Contributor
Posts: 199
Joined: Wed May 19, 2004 8:45 am
Location: London

Post by duk »

hummm... are you puting the headers correctly??

if yes you can use HTML...

to display the image you just need to use <img src="domain/jpg">

the headers:

Code: Select all

$headers  = "MIME-Version: 1.0\n";
 $headers .= "Content-type: text/html; charset=iso-8859-1\n";
Post Reply