联系php表单不断发送错误

时间:2017-05-31 23:55:53

标签: php forms contact contact-form

我使用Tecite作为我的联系表单,并试图让我的表单工作,但每次说出来时都会出现错误信息:

"处理表单时发生了错误。"

工作人员......它继续作为一般错误消息。

我不确定我的代码中缺少什么但是会喜欢一些帮助!!

我在下面发布了我的代码,一个是contact.html,另一个是formmail php代码。

php表单 --- --- contact.html

     Haus of Originals

<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="Haus of Originals Website">
<link href="css/style_contact.css" rel="stylesheet" type="text/css" />
<link rel="icon" type="image/png" href="images/h_favicon2.png">

<!-- Script -->
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script>


<!-- Responsive and mobile friendly stuff -->
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

             

Haus of Originals

</div>
<div class="button_container" id="toggle">
    <span class="top"></span>
    <span class="middle"></span>
    <span class="bottom"></span>
</div>
<div class="overlay" id="overlay">
    <nav class="overlay-menu">
        <ul>
            <li><a class="one" href="home.html" title="Home">Home</a></li>
            <li><a class="one" href="about.html" title="About">About</a></li>
            <li><a class="one active" href="contact.html" title="Contact">Contact</a></li>
        </ul>
    </nav>
</div>
<!-- Header Gif -->

<div class="section banner">
    <h4>
            We are building brands that we want to be apart of, welcome home. </h4>

</div>

<!-- Header Gif End -->
<div class="section group">
    <img src="images/rtt.jpg" alt="walllogo">
</div>
<div class="section group three">

    <div class="column span_1_of_2">
        <h5>Contact</h5>

        <h6>   Haus of Originals<br>
                       28 Intrepid Drive <br>
                       Bozeman, Montana 59718
                                        <br>
                                        <br>
                       651.470.6511<br>
                       406.459.5954
                       <br>           <br>

    <a class="three" href="mailto:info@hausoforiginals.com">info@hausoforiginals.com</a>
               </h6>
    </div>


    <div class="column span_2_of_2">

    </div>
</div>
<div class="section group four">
    <section class="contact-wrap">

        <!--Form Action Needs to point to where you have uploaded the formail.php file-->
        <form method="post" action="http://www.hausoforiginals.com/formmail/formmail.php" name="ContactForm"  class="contact-form">
        <!-- Keep this line it's base settings to check and send the form -->
            <input type="hidden" name="env_report" value="REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT,AUTH_TYPE,REMOTE_USER" />

            <!-- This sets where the email is sent to -->
              <input type="hidden" name="recipients" value="info@hausoforiginals.com" />
            <!-- This sets the fields to be required. -->
                <input type="hidden" name="required" value="EmailAddress:Your email address,FirstName:Your name,Message: Your message" />
            <div class="col-sm-6">
                <div class="input-block">
                    <label for="FirstName">First Name</label>
                    <input type="text" name="FirstName" class="form-control">
                </div>
            </div>


            <div class="col-sm-12">
                <div class="input-block">
                    <label for="EmailAddress">Email</label>
                    <input type="email" name="EmailAddress" class="form-control">
                </div>
            </div>
            <div class="col-sm-12">
                <div class="input-block">
                    <label for="MessageSubject">Subject</label>
                    <input type="text" name="MessageSubject" class="form-control">
                </div>
            </div>
            <div class="col-sm-12">
                <div class="input-block textarea">
                    <label for="Message">Spit it Out</label>
                    <textarea rows="3" name="Message" class="form-control"></textarea>
                </div>
            </div>
            <div class="col-sm-12">
                <input type="submit" value="Submit" class="square-button">Send It

            </div>
        </form>
    </section>
</div>

<div class="section group two">

    <div class="col spanfooter_1_of_3">
        <img class="logoone" src="images/h_logo_hp.jpg" alt="logo">
    </div>

    <div class="col spanfooter_2_of_3">
                    <h2>Handles </h2>

                    <a href="https://www.instagram.com/hausoforiginals/"><p>Instagram</p> </a>   

                    <a href="https://twitter.com/HausofOriginals"><p>Twitter </p></a>     

                      <a href="https://www.facebook.com/HausofOriginals/"><p>Facebook </p></a>  


        <a href="#top" class="toTopLink"><b>back to top</b></a>
    </div>

    <div class="col spanfooter_3_of_3">
        <h2>Get in Touch</h2>

        <p> 651.470.6511 <b>|</b> 406.459.5954 </p><br>


        <a class="two" href="mailto:info@hausoforiginals.com"><b>info@hausoforiginals.com</b></a>

        <br>
        <p>
            2017 © All Rights Reserved
        </p>
    </div>
</div>
<script type="text/javascript">
    $(document).ready(function() {
        $(window).bind('scroll', function() {
            checkScrollPos();
        });
        checkScrollPos();

        $('.toTopLink').bind('click', function() {
            $('html, body').animate({
                scrollTop: 0
            }, $(window).scrollTop() / 3);
            return false;
        });
    });

    function checkScrollPos() {
        if ($(window).scrollTop() > 600) {
            $('.toTopLink').fadeIn(1000);
        } else {
            $('.toTopLink').fadeOut(1000);
        }
    }

    $(document).ready(function() {

        //material contact form
        $('.contact-form').find('.form-control').each(function() {
            var targetItem = $(this).parent();
            if ($(this).val()) {
                $(targetItem).find('label').css({
                    'top': '10px',
                    'fontSize': '14px'
                });
            }
        })
        $('.contact-form').find('.form-control').focus(function() {
            $(this).parent('.input-block').addClass('focus');
            $(this).parent().find('label').animate({
                'top': '10px',
                'fontSize': '14px'
            }, 300);
        })
        $('.contact-form').find('.form-control').blur(function() {
            if ($(this).val().length == 0) {
                $(this).parent('.input-block').removeClass('focus');
                $(this).parent().find('label').animate({
                    'top': '25px',
                    'fontSize': '18px'
                }, 300);
            }
        })

    });


    $('#toggle').click(function() {
        $(this).toggleClass('active');
        $('#overlay').toggleClass('open');
    });
</script>

0 个答案:

没有答案