/    Sign up×
Community /Pin to ProfileBookmark

array to email…

Good day to you all,
I was wondering how can I make my array listed in my email script below.
I know how to send an e-mail, I pass it through a form…

Here is it:

[code=php]

<?php
$pics = $_POST[“pics”];

foreach ($pics as $p) {
echo $p.”<br />”;
}

$to = “[email protected], [email protected]”;
$from_header = “From: [email protected]”;

$subject = “Salut Marc, voici le choix d’Andrew.”;
$contents = “$pics”;
if($contents != “$p”)
{
//send mail – $subject & $contents come from surfer input
mail($to, $subject, $contents, $from_header);
// redirect back to url visitor came from
header(“Location: images.php?folder=Andrew/View”);
}
else
{
print(“<HTML><BODY>Error, no comments were submitted!”);
print(“</BODY></HTML>”);
}

?>

[/code]

Thank for any help with this !

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @Peuplarchie spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.27,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...