I’ll keep it simple - I can do css / html but I know nothing about php. This form “replies” to requests successfully, but leaves the fields blank - it works perfectly on another host, but not the one I’m dealing with now… Any ideas what’s missing?
HTML Code:
Request a Callback
Name
Telephone Number
PHP Code:
<?php if(isset($_POST['name'])) { $email_to = "[email protected]"; $email_subject = "Contact from Fizz Web Design"; // validation expected data exists if(!isset($_POST['name']) || !isset($_POST['telephonenumber'])) $name = $_POST['name']; // required $telephone_number = $_POST['telephonenumber']; // required $email_message = "Form 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 .= "Telephone Number: ".clean_string($telephonenumber)."\n"; // create email headers $headers = 'From: Fizz Web Design'. //'Reply-To: '.$email_from."\r\n" . 'X-Mailer: PHP/' . phpversion(); @mail($email_to, $email_subject, $email_message, $headers); ?> <?php } ?>