rendered paste body<?php // YOU CAN CHANGE THESE LINES IF YOU WANT //$mail_to = "info@rockfortsecurity.co.uk"; $mail_to = "admin@ansimation.net"; $mail_subject = "Contact Message from: "; // the value of the name will be added after // DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU'RE DOING function get($array,$key,$default = null) { return isset($array[$key]) ? $array[$key] : $default; } $name = get($_POST,"f_name",0); $comp = get($_POST,"f_company",0); $phone = get($_POST,"f_phone",0); $email = get($_POST,"f_email",0); $mesag = wordwrap(get($_POST,"f_message",0),70); if($name && $email && $phone && $mesag) { $mail_subject .= $name; $mail_body = "This is a form generated email from a user at http://www.rockfortsecurity.co.uk.\n"; $mail_body .= "\n"; $mail_body .= "From: ".$name."\n"; $mail_body .= "Company: ".$comp."\n"; $mail_body .= "Telephone: ".$phone."\n"; $mail_body .= "E-Mail Address: ".$email."\n"; $mail_body .= "\n"; $mail_body .= "Message:\n"; $mail_body .= $mesag; if(mail($mail_to,$mail_subject,$mail_body)){ header("location: http://www.rockfortsecurity.co.uk/index-6a.html"); } else { die("email not sent"); } } else { die("you suck"); header("location: ".$_SERVER['HTTP_REFERER']); }?>