I want to be able to have someone add an image to this form and have it emailed to me along with the rest of the chosen options. I can get everything else to work. What code is needed to pull the information from the attach form to an email to me. thanks
Code:::
In the site:
<form action="contact_.php" method="post" enctype="multipart/form-da
ta">
<input type="file" name="profile_photo" size="40"><input type="submit" name="upload" value="Upload">
The code in the form action php file:
<?php
$to = "fakeEmail@domain.zzz";
$subject = "Contact Us";
$email = $_REQUEST['email'];
$personInterests = $_REQUEST["interests"] ;
$personInterests = implode(", ", $personInterests);
$message = $_REQUEST["real_first_name
"]. "\n" ;
$message .= $_REQUEST["real_last_name"
]. "\n" ;
$message .= $_REQUEST["stage_name"]. "\n" ;
$message .= $_REQUEST["dob_mon"]."\n" ;
$message .= $_REQUEST["dob_day"]. "\n";
$message .= $_REQUEST["dob_year"]. "\n" ;
$message .= $_REQUEST["ethnicity"]. "\n" ;
$message .= $_REQUEST["gender"]. "\n" ;
$message .= $_REQUEST["address"]. "\n" ;
$message .= $_REQUEST["city"]. "\n" ;
$message .= $_REQUEST["state"]. "\n" ;
$message .= $_REQUEST["zipcode"]. "\n" ;
$message .= $_REQUEST["cellphone"]. "\n" ;
$message .= $_REQUEST["homephone"]. "\n" ;
$message .= $_REQUEST["website"]. "\n" ;
$message .= $_REQUEST["feet"]."\n" ;
$message .= $_REQUEST["inches"]."\n" ;
$message .= $_REQUEST["haircolor"]. "\n" ;
$message .= $_REQUEST["eyecolor"]. "\n" ;
$message .= $_REQUEST["weight"]. "\n" ;
$message .= $_REQUEST["bust"]. "\n" ;
$message .= $_REQUEST["cup"]. "\n" ;
$message .= $_REQUEST["waist"]. "\n" ;
$message .= $_REQUEST["hips"]. "\n" ;
$message .= $_REQUEST["bodymodificatio
ns"]. "\n" ;
$message .= $personInterests;
$message .= $_REQUEST["biography"].
$headers = "From: $email";
$sent = mail($to, $subject, $message, $headers) ;
if($sent)
{print "Your mail was sent successfully"; }
else
{print "We encountered an error sending your mail"; }
?>
Start Free Trial