[UPHPU] Trying to Email Images

Walt Haas haas at xmission.com
Tue Dec 19 07:39:21 MST 2006


Uploaded file is retrieved from $_FILE per:

    http://www.php.net/manual/en/features.file-upload.php

For a good working example see Gallery:

    http://gallery.menalto.com

-- Walt


On Tue, 2006-12-19 at 08:25 -0500, Nicholas Vettese wrote:
> I am having some problems with a script.  I have an HTML form, with an
> external PHP script, and everything works except the part where it is
> supposed to send me the images.  I was hoping that this list may be able
> to point me in the right direction.  In the <form> tag, I do have
> enctype set for files.  The HTML script looks like this:
>  
> I have an HTML form, with an external PHP script, which I am trying to
> use to email me the images a user uploads. The script is pretty
> rudimentary, but the text portions work. The HTML part looks like this:
> 
> <HTML script>
> <p>Please use this area to upload at least three pictures.</p>
> <table>
> <tr><td align="left"><input type="file" name="pic1" /></td></tr>
> <tr><td align="left"><input type="file" name="pic2" /></td></tr>
> <tr><td align="left"><input type="file" name="pic3" /></td></tr>
> <tr><td align="left"><input type="file" name="pic4" /></td></tr>
> </table>
> </HTML script>
> 
> Here is the PHP Script, which I am having problems with.
> 
> <PHP script>
> <?php
> 
> extract($_POST);
> 
> $msg =<<<Message
> Email Sent from Soul Exposure Photography Form Page
> 
> General Information
> I_am_here_to: <b>$apply</b>
> FirstName: <b>$fname $lname</b>
> Address1: $addr1
> Address2: $addr2
> City: $city
> State: $state
> Zip: $zip
> Email Address: $Email
> Phone: $phone
> Date_of_Birth: $BdateMonth $BdateDay $BdateYear
> Gender: $gender
> 
> Modeling Information
> 
> Height: $height
> Weight: $weight
> Bra_Size: $bra
> Waist: $waist
> Hips: $hips
> Dress_Size: $dress
> Shoe_Size: $shoes
> Eye_Color: $eyes
> Hair_Color: $hair_color
> 
> Upload your Images
> Image1: $pic1
> Image2: $pic2
> Image3: $pic3
> Image4: $pic4
> 
> Message;
> # the above terminator was moved from where it's commented out below
> 
> $to = saprod_sj at yahoo.com;
> 
> $subject = "Soul Exposure Photography Profile Form Submission";
> # The following should be a real email address like:
> # "From: \"$Fname $Lname\" <$Email>\n\n";
> 
> $mailheaders = "From: SoulX Photo Website\n\n";
> $Result = mail($to,$subject,$msg,$mailheaders); 
> echo "<h2>Hey $Fname, thanks for your submission</h2>\n";
> header('Location: http://www.soulxphoto.com/');
> #Message; This lable was misplaced.
> ?>
> </script>
> 
> Thanks,
> nick
> 
> _______________________________________________
> 
> UPHPU mailing list
> UPHPU at uphpu.org
> http://uphpu.org/mailman/listinfo/uphpu
> IRC: #uphpu on irc.freenode.net



More information about the UPHPU mailing list