• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4576
  • Last Modified:

Send picture using php?

I have a .php file with the following code:


<head>
<META HTTP-EQUIV="Refresh"
      CONTENT="0; URL=http://www.freewebtown.com/year3/thanks4.html">
        </head>
        <CENTER><font face="Arial" size"3">Thanks! You have successfully filled in the form.<BR><BR><font face="6"><b>Please wait!
<body><script language="php">
$email = $HTTP_POST_VARS[email];
$mailto = "adam****en@hotmail.com";
$mailsubj = "Form submission";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Values submitted from web site form:\n";
while (list ($key, $val) = each ($HTTP_POST_VARS)) { $mailbody .= "$key : $val\n"; }
if (!eregi("\n",$HTTP_POST_VARS[email])) { mail($mailto, $mailsubj, $mailbody, $mailhead); }
</script>
</body>



This works briliantly when people enter values into a form...
However, is it possible to send pictures through php? I would love to know how to do one of the following things:
1) send a picture on screen to me (in any format) through e-mail, or to publish on another website ready for me to take a look (- is there a website that does this?)
2) to have a 'browse' button automatically upload an image and send to me through e-mail

I have found code that allows me to put a picture drawn on screen into a .jpg (http://members.lycos.co.uk/bickleigh/sign4.html), but don't know how to take it from there.


What am I doing? I want some children on my website to draw pictures and add it to a gallery...!

Thanks in advance,
Adam.
0
freeaj
Asked:
freeaj
1 Solution
 
pigmentartsCommented:
The simplest way - in the body if the email client that receives it accepts HTML, you can just include an image

Eg.
In the body of the code above:

<img src="http://where-my-image-is-stored.com/some-image.jpg" alt="test />

That’s the nice and easy way, if not you will need to file browse, and be able to add it as a attachment to the email etc
0
 
freeajAuthor Commented:
Yes! Thanks SoyYop!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now