If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Jun 2012
    Member #
    I have created this php file so that users can apply online. There is two areas thou where I need them to upload a picture. I listed those values as 'headshot' and 'bodyshot'. What else do I need add to this php so that the files will attach properly and send?

    I am new to learning this and would really like clear insight on what to add. Thank you for your time and help!

    Current code:

    PHP Code:

    /* Email Variables */
    $emailSubject 'employment';
    $webMaster '[EMAIL][/EMAIL]';

    /* Data Variables */
    $firstname $_POST['firstname'];
    $lastname $_POST['lastname'];
    $address $_POST['adress'];
    $city $_POST['city'];
    $zipcode $_POST['zipcode'];
    $phone $_POST['phone'];
    $email $_POST['email'];
    $howdidyouhear $_POST['howdidyouhear'];
    $age $_POST['age'];
    $uscitizen $_POST['uscitizen'];
    $driverlicense $_POST['driverlicense'];
    $transportation $_POST['transportation'];
    $adultservice $_POST['adultservice'];
    $bodycomfort $_POST['bodycomfort'];
    $headshot $_POST['headshot'];
    $bodyshot $_POST['bodyshot'];
    $startdate $_POST['startdate'];
    $hours $_POST['hours'];
    $weekdays $_POST['weekdays'];
    $aboutyou $_POST['aboutyou'];
    $whywork $_POST['whywork'];
    $questions $_POST['questions'];

    $body = <<<EOD
    First Name: 
    $firstname <br>
    Last Name: 
    $lastname <br>
    $address <br>
    $city <br>
    Zip Code: 
    $zipcode <br>
    $phone <br>
    $email <br>
    How did you hear about us: 
    $howdidyouhear <br>
    $age <br>
    Are you eligible to work in the US: 
    $uscitizen <br>
    Do you have a vaild Drivers License: 
    $driverlicense <br>
    Do you have reliable transportation: 
    $transportation <br>
    Have you worked in an adult/exotic service before: 
    $adultservice <br>
    On a scale how comfortable are you with your body: 
    $bodycomfort <br>
    $headshot <br>
    $bodyshot <br>
    When could you start: 
    $startdate <br>
    Total hours available per week: 
    $hours <br>
    What days are you available: 
    $weekdays <br>
    What you do now: 
    $aboutyou <br>
    Why you want to work for Cleaning Done Right: 
    $whywork <br>
    Questions for us: 
    $questions <br>
    $headers "From: $email\r\n";
    $headers .= "Content-type: text/html\r\n";
    $success mail($webMaster$emailSubject$body,

    /* Results rendered as HTML */
    $theResults = <<<EOD
    <title>sent message</title>
    <meta http-equiv="refresh" content="3;URL=[URL][/URL]">
    <style type="text/css">
    body {
    background-color: #444; /* You can edit this CSS to match your website*/
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 20px;
    font-style: normal;
    line-height: normal;
    font-weight: normal;
    color: #fec001;
    text-decoration: none;
    padding-top: 200px;
    margin-left: 150px;
    width: 800px;
    <div align="center">Thank you. Your application has been successfully sent to Cleaning Done Right.</div>
    [put all PHP scripting between PHP code brackets so the script is shown as above]


  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Cottage Grove, Minnesota
    Member #
    761 times
    Typically, everything you're doing is done online, with a database.
    There are no emails involved in this.

    A person "registers", or creates an account, and uploads their information,
    photos, etc. using a form. Their info is stored in a database that can be
    accessed by the site owner (or admin person). The only emails involve
    a confirmation of registration, validate an email, or simply normal email

    The main problems with your email method are these:

    1) Once the form is sent, it's sent.

    2) If the user makes a mistake, it can't be corrected unless the
    whole thing is done all over again ... and what if they make another
    error? If it were you filling it out, would you be happy to retype
    everything two or three times? And what if you decided you didn't
    like the photo you sent, or you sent the wrong photo?

    3) Each time they send or fix an error, another email is sent. So the
    recipient has to determine what was fixed and somehow fix it on their end.

    4) So ... the recipient has some sort of database on their PC? How messed-up
    is that? They have to see their emails and figure out what to add and what
    not to add?

    5) The emails go to one person, or to several people? Who knows what has
    been read and not read? What if the recipient of the email is on vacation,
    or worse yet, has quit the company? Who is able to see the emails that
    are coming in?

    6) Nothing you do with emails is secure. You're dealing with personal
    information that should be kept on a secure server? What if the emails
    that are sent accidently get forwarded to someone who might be offended
    by exotic (sexually explicit) cleaning services?

    With a database, anyone with an admin password can view the database
    anytime, anywhere in the world. The user can log into their own profile and
    make changes whenever they wish to do so.

    So I'm not going to spend the time to provide scripting for email attachments,
    because I think you're not doing this the correct way. Maybe someone else can
    give you some script examples. By not using a database, you're certainly going
    to be disappointed in the outcome of your project.


    You may consider creating a WordPress (non-blog) website using a profile system:

  4. #3
    Junior Member
    Join Date
    Jun 2012
    Member #
    Thanks for the insight. This is just the first initial build of the site, we will use databases later on in the next 2 months, but for now I need help with the current code to produce the upload for the files.

    Can anyone please assist me with what I am asking for?

    Thank you again for your time in advance.

  5. #4
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Cottage Grove, Minnesota
    Member #
    761 times
    This might be a good place to start looking:

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search tags for this page

contact form with multiple attachment in php

Click on a term to search for related topics.
All times are GMT -6. The time now is 09:17 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2022 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: