I am very, very new to using any sort of php, I am only somewhat experienced in html and css. I have a form I made in html, but am struggling with my process page. (php) The page works, it emails forms to me, however, I am not getting the drop down list selection (subject) nor am I receiving the (picture) attachment. I am looking to see if someone could help me out on this, I apologize if my code looks like butt, but it’s what I got. ???
Thank you,
Jared
[php]
<?php
if(isset($_POST[‘email’])) {
$email_to = "support@******.com";
$email_subject = "Contact Form";
$name = $_POST['name'];
$email = $_POST['email'];
$tel = $_POST['tel'];
$subject = $_POST['subject'];
$attachment = $_POST['attachment'];
$description = $_POST['description'];
$email_message = "Contact request details below.\n\n";
function clean_string($string) {
$bad = array("content-type","bcc:","to:","cc:","href");
return str_replace($bad,"",$string);
}
$email_message .= "Name: ".clean_string($name)."\n";
$email_message .= "Email: ".clean_string($email)."\n";
$email_message .= "Phone: ".clean_string($tel)."\n";
$email_message .= "Subject: ".clean_string($subject)."\n";
$email_message .= "Picture: ".clean_string($attachment)."\n";
$email_message .= "Description: ".clean_string($description)."\n";
$headers = 'From: '.$email."\r\n".
'Reply-To: '.$email."\r\n" .
‘X-Mailer: PHP/’ . phpversion();
@mail($email_to, $email_subject, $email_message, $headers);
?>
Thank you <?php echo $_POST["name"]; ?> for contacting us. We will respond to your email as soon as possible.
<?php } ?> </p>
[/php]