contact us page gets http verb error on submittal

Posted on 2011-05-08
Last Modified: 2012-05-11
I am trying to find out how to fix the issue with the contact us page on at the following link:

After I complete a submittal of an inquiry and hit the submit button, I get an error.  How do I fix this issue.  GET will not fix the issue, please let me know what I can do.
Question by:VBBRett
    LVL 82

    Expert Comment

    by:Dave Baldwin
    You can't POST to an HTML page and you can't GET a "multipart/form-data".  POST with "multipart/form-data" has to be sent to a script page like PHP or ASP that can receive the data.

    Author Comment

    Can you be more detailed and perhaps provide a solution?
    LVL 82

    Accepted Solution

    There is really no more detail, that's the way it works.  HTML is a page description language, not a programming language.  Simple GET info contained in a URL can be processed with javascript.  But POST data requires a programming language like PHP or ASP that can receive and process the POST data on the server.

    Below is my PHP email demo page.  Save it as 'Email.php', change the email address to your own, and run it on your server.  If your server supports a SMTP server, you can send email with it.
    # some settings of POST vars
    if (!isset($_POST['send']))  $send = ''; else $send = $_POST['send'];
    if (!isset($_POST['toText'])) $toText = ''; else $toText = $_POST['toText'];
    if (!isset($_POST['ccText'])) $ccText = ''; else $ccText = $_POST['ccText'];
    if (!isset($_POST['subjectText'])) $subjectText = ''; else $subjectText = $_POST['subjectText'];
    if (!isset($_POST['msgText'])) $msgText = ''; else $msgText = $_POST['msgText'];
    if (!isset($_POST['ccText'])) $ccTexth = ''; else $ccText = $_POST['ccText'];
    if (!isset($_POST['bccText'])) $bccText = ''; else $bccText = $_POST['bccText'];
    if (!isset($_POST['nameText'])) $nameText = ''; else $nameText = $_POST['nameText'];
    if (!isset($_POST['fromText'])) $fromText = ''; else $fromText = $_POST['fromText'];
    if ($send == "") {
        $title="Test Email Page";
    else {
    	if($fromText === "") die("No name!");
    	$title="Test Email Page";
      $announce="Your Message has been Sent!";
    	$header = "From: ".$fromText."\r\n";
    //	$header .= "Cc: ".$ccText."\n";
    	$header .= "Reply-To : ".$fromText."\r\n";
    	$header .= "Return-Path : ".$fromText."\r\n";
    	$header .= "X-Mailer: PHP\r\n";
    	$header .= "MIME-Version: 1.0\r\n";
    	$header .= "Content-Type: text/plain; charset=iso-8859-1\r\n";
    //	ini_set(sendmail_from,$fromText);  
    	mail($toText, $subjectText, $msgText, $header, '-f'.$fromText);
    //	ini_restore(sendmail_from);
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title><?php echo($title)?></title>
    <style type="text/css">
    A:link { color: #999999; }
    A:visited { color: #999999; }
    A:hover {color: #0099ff;}
    <script type="text/javascript">
    function check()
    var at=document.getElementById("fromText").value.indexOf("@");
    var eml=document.getElementById("fromText").value;
    var nam=document.getElementById("nameText").value;
    var alerttxt="";
    var submitOK="true";
    if (eml.length < 5 || at == -1)
        alerttxt=alerttxt+"Please enter a valid e-mail address!\r\n";
        //return false;
    if (nam.length < 3)
        alerttxt=alerttxt+"Please enter your name.\r\n";
        //return false;
    if (submitOK=="false")
        return false;
    // -->
    <body bgcolor="#ddeedd">
    <div align="center">
    <table border="0" cellpadding="0" cellspacing="0" summary="" width="580">
    <tr><td align="center">
    if ($send != "") {
       	echo ("To: ".$toText."<br>\r\nSubject: ".$subjectText."<br>\r\n".$msgText."<br>\r\n".$header);
    <p><b><font color="#000000" size="5">Test Email</font></b></p>
    <font size="4" color="#000000">
    <!--   <form method="POST" action="<?php echo($PHP_SELF)?>"> -->
      <form method="POST" action="Email.php" onsubmit="return check();">
        <p><font size="3"><b>Name: <input type="text" name="nameText" id="nameText" size="46"></b></font></p>
        <p><font size="3"><b>Email: <input type="text" name="fromText" id="fromText" size="46"></b></font></p>
        <input type="hidden" name="subjectText" value="Web Mail">
        <p><font face="Arial" size="3"><b>Message Text:</b></font></p>
        <p><font face="Arial" size="3"><b><textarea rows="6" name="msgText" cols="60"></textarea></b></font></p>
        <p><font size="3"><b><input type="submit" value="Send" name="send" style="font-family: Arial; font-size: 12pt; font-weight: bold"></b></font></p>
        <input type="hidden" name="state" value="1">
      <b><font face="Arial" size="4" color="#e00000"><?php echo($announce)?></font></b><br><br>

    Open in new window


    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
    Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
    In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
    In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now