Upload picture on Flash site, send in e-mail via PHP form.

Posted on 2008-11-18
Last Modified: 2013-12-13
I am building a Flash site for a modeling agency.  They need a form on the site that allows both information (name, height, etc.) to be e-mailed along with an uploaded photo to the agency e-mail address.

I know how to use PHP to upload a photo to the server.  But I want to know how to actually have the photo e-mailed as an attachment via the PHP e-mail.

The PHP script I got from this site to upload to the server is:

$target_path = "./uploads/";
$target_path = $target_path . basename( $_FILES['Filedata']['name']);
move_uploaded_file($_FILES['Filedata']['tmp_name'], $target_path);

How does that need to be changed to make it e-mail instead of upload to a folder on the server?


Question by:lifeat30fps
    LVL 4

    Expert Comment

    Hi Glen,

    This website tells you exactly how to do this, starting from basics. This should solve your problem.
    LVL 4

    Accepted Solution


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Easy Project Management (No User Manual Required)

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Introduction Many web sites contain image galleries; a common design for these galleries includes a page with a collection of thumbnail images.  You can click on each of the thumbnail images to see the larger version of the image.  This is easily i…
    Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
    The viewer will learn how to dynamically set the form action using jQuery.
    The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now