robvoz Posted May 31, 2010 Share Posted May 31, 2010 Hi, I've no experience of php whatsoever, so I suspect and hope this will be very easy to resolve. It's the standard contact form for the package I used to create my website, but there is a parser error to do with quotation marks from what I can gather. All help gratefully received. The url is: www.vozmedia.co.uk/contact.html if you want to see the error online. Cheers, Rob [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/203448-help-with-contact-form/ Share on other sites More sharing options...
riwan Posted May 31, 2010 Share Posted May 31, 2010 you didn't escape your quote in all 3 meta this would work <?php // Website Contact Form Generator // http://www.tele-pro.co.uk/scripts/contact_form/ // This script is free to use as long as you // retain the credit link // get posted data into local variables $EmailFrom = Trim(stripslashes($_POST['EmailFrom'])); $EmailTo = "[email protected]"; $Subject = "Voz Media contact"; $name = Trim(stripslashes($_POST['name'])); $message = Trim(stripslashes($_POST['message'])); echo "x"; // validation $validationOK=true; if (Trim($EmailFrom)=="") $validationOK=false; if (!$validationOK) { print "<meta http-equiv=\"refresh\" content=\"0;URL=www.vozmedia.co.uk\">"; exit; } // prepare email body text $Body = ""; $Body .= "name: "; $Body .= $name; $Body .= "\n"; $Body .= "message: "; $Body .= $message; $Body .= "\n"; // send email $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>"); // redirect to success page if ($success){ print "<meta http-equiv=\"refresh\" content=\"0;URL=www.vozmedia.co.uk/contactsucess.html\">"; } else{ print "<meta http-equiv=\"refresh\" content=\"0;URL=www.vozmedia.co.uk/contactfailure.html\">"; } ?> Link to comment https://forums.phpfreaks.com/topic/203448-help-with-contact-form/#findComment-1065861 Share on other sites More sharing options...
robvoz Posted May 31, 2010 Author Share Posted May 31, 2010 Perfect! Thanks very much. Link to comment https://forums.phpfreaks.com/topic/203448-help-with-contact-form/#findComment-1065890 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.