09-08-2008, 05:34 AM
|
#3 (permalink)
|
|
The Addict
Join Date: Aug 2008
Posts: 336
Thanks: 8
|
are you trying to add an array of pics to the content of your email?
if that's the case you need to flat out the email in the content variable. more so like this:
PHP Code:
<?php
$pics = $_POST["pics"];
if (empty($pics[0])){
foreach ($pics as $p)
$contents .= $p."<br />"; //this is of course assuming that each $p value is a valid image tag
$to = "franck@peuplies.info, fbeausol@justice.gc.ca";
$from_header = "From: franck@peuplies.info";
$subject = "Salut Marc, voici le choix d'Andrew.";
//send mail - $subject & $contents come from surfer input
mail($to, $subject, $contents, $from_header);
// redirect back to url visitor came from
//$_SERVER['HTTP_REFERER'] already has the address of the page (if any) which referred the user agent to the current page
header("Location: ".$_SERVER['HTTP_REFERER']);
}else{
$error_msg="Error, no comments were submitted!";
}
?>
I hope that makes sense or that is what you asked
|
|
|
|