contact ewonder
"; if (strlen($name) > 30) {die;} if (strlen($email) > 60) {die;} if (strlen($telephone) > 15) {die;} if (strlen($company) > 30) {die;} $error = 0; if ($submit) { if ($email && ! preg_match("/[\w\.\-]+@[\w\.\-]+/",$email)) { $error = 1; $html .= "Your email address is not of the correct format. Please check - it should look something like yourname@yourisp.com";} if (!$email || !$name) { $error = 1; $html .= "Please supply both your email address and name."; } } if ($submit && !$error) { $text = "Website Registration\n\n Name: $name Company: $company Email: $email Telephone: $telephone Interest: $interest "; $email_to = "alistair@ewonder.co.uk"; $email_to_name = "Ali Watters"; utils_mail_new($email_to,$email_to_name,"Website Contact","$text",$email,$name); $fp = fopen("contact-results.csv",'a+'); $date = strftime('%D %T'); $txt = "$date,'$name','$company','$email','$telephone','$interest'\n"; fwrite($fp,$txt , strlen($txt)); fclose($fp); $html .= "Thank you very much for contacting ewonder."; } if (!$submit || $error) { $html .= "
"; } $page[title] = $title; $page[header_title] = ""; $page[content] = $html; $page[template] = 'ewd_main.html'; template($page,1); db_close(); ?>