Contact Form Issues
Hi, I seem to be having some issues with my Contact Form. When hitting the Submit button, the message I get back is:
"InvalidArgumentInvalid argument.
POST object expects Content-Type multipart/form-data"
I'm not sure how to pin-point this error on this snippet of coding, would anyone here be able to help me out? I'll post the code below.
<script type="text/javascript">
function() {
var s,a,i,j,r,c,l,b=document.getElementsByTagName("script");l=b[b.length-1].previousSibling;a =l.getAttribute('data-cfemail');
if(a){s='';r=parseInt(a.substr(0,2),16);
for(j=2;a.length- j ;j+=2){c=parseInt(a.substr(j,2),16)^r;s+=String.fromCharCode(c);}s=document.createTextNode(s);l.parentNode.replaceChild(s,l);}};
</script>
<?php
$name = $_POST['name0'];
$phone = $_POST['phone0'];
$email = $_POST['email0'];
$remarks = $_POST['remarks0'];
$formcontent=" From: $name \n Phone: $phone \n Email: $email \n Remarks: $remarks";
$recipient = "(placeholder text, this is usually filled out, ignore this)";
$subject = "Contact Form";
$mailheader = "From: $email \r\n";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
echo "Thank You!";
?>
<form method="POST" action="contact.php" onSubmit="" name="Contact Us" webbot-action="--WEBBOT-SELF--">
<input TYPE="hidden" NAME="VTI-GROUP" VALUE="0" />
<br><strong><p style="font:Arial, Helvetica, sans-serif; font-family:Arial, Helvetica, sans-serif; font-size:24px">Contact Us</p></strong>
<form action="_vti_bin/shtml.dll/contactus.htm" method="post" name="Contact Us" id="Contact Us" onsubmit="" webbot-action="--WEBBOT-SELF--">
<strong>Name:</strong><br >
<input name="name0" size="28" type="text" />
<br><strong>Email:</strong><br>
<input name="email0" size="28" type="text" />
<br><strong>Phone:</strong><br >
<input name="phone0" size="28" type="text" />
<br><strong>Message:</strong><br>
<strong>max. 200 characters</strong><br>
<textarea rows="5" name="remarks0" cols="30"></textarea><br>
<input type="submit" value="Submit" name="Contactus0" onclick="gtag_report_conversion"/>
<input type="reset" value="Reset" name="B3" />
<!-- Event snippet for New Website Conversion conversion page
In your html page, add the snippet and call gtag_report_conversion when someone clicks on the chosen link or button. -->
<script>
function gtag_report_conversion(url) {
var callback = function () {
if (typeof(url) != 'undefined') {
window.location = url;
}
};
gtag('event', 'conversion', {
'send_to': 'AW-704540033/A-1ICKOF9cABEIHb-c8C',
'event_callback': callback
});
return false;
}
</script>
