array to email...

Discussion in 'Programming' started by Peuplarchie, Sep 4, 2008.

  1. #1
    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:

    
    
     <?php
    $pics = $_POST["pics"];
    
    
    foreach ($pics as $p) {
    echo $p."<br />";
    }
    
    
    
    
    
    
    $to = "franck@peuplies.info, fbeausol@justice.gc.ca";
    $from_header = "From: franck@peuplies.info";
    
    $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>");
    }
    
    
    
    
    
    
    
    ?>
    
    
    PHP:

    Thank for any help with this !
     
    Peuplarchie, Sep 4, 2008 IP
  2. Limotek

    Limotek Peon

    Messages:
    165
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi Peuplarchie,

    I don't quite follow. Are you looking to display the image names or the actual images?

    If you are simply looking to print the contents of the array then print_r should work.
     
    Limotek, Sep 5, 2008 IP