Bootstrap 4表单不保存任何消息

我的bootstrap 4表单没有发送任何消息,我已经在服务器上上传了index.php和contact.php文件,但没有任何响应。您能帮我发现问题吗?


登陆页面形式简单


<form id="#contacts" method="POST" class="form" role="form">

    <div class="row">

        <div class="col-md-6 form-group">

            <input class="form-control" id="name" name="name"

                   placeholder="Podaj swoje Imię i nazwisko" type="text" required/>

        </div>

        <div class="col-md-6 form-group">

            <input class="form-control" id="website" name="website"

                   placeholder="Adres strony www" type="text" required/>

        </div>

        <div class="col-md-6 form-group">

            <input class="form-control" id="telephone" name="telephone"

                   placeholder="Podaj swój numer telefonu" type="text" required/>

        </div>

        <div class="col-md-6 form-group">

            <input class="form-control" id="email" name="email"

                   placeholder="Podaj swój email" type="email" required/>

        </div>

    </div>

    <textarea class="form-control" id="message" name="message" placeholder="Twoja wiadomość"

              rows="4"></textarea>

    <br>

    <div class="row">

        <div class="col-md-12 form-group">

            <button class="btn btn-primary" type="submit">Wyślij</button>

        </div>

    </div>

</form>

contact.php


<?php

$name = $_POST['name'];

$email = $_POST['email'];

$message = $_POST['message'];

$website = $_POST['website'];

$telephone = $_POST['telephone'];


$email_from = 'SEO';

$email_subject = 'Wiadomość kontaktowa z... '

$email_body = "Name: $name.\n".

              "Email: $email.\n".

              "Message: $message.\n";

              "Website: $website.\n";

              "Telephone: $telephone.\n";


$to = "biuro@of.pl";

$headers = "From: $email_from r\n";

$headers .= "Reply-To: $email r\n";


mail($to,$email-$email_subject,$email_body,$headers);


header("location: index.php");


?>


12345678_0001
浏览 127回答 1
1回答

jeck猫

您的表格遗失&nbsp;Action<form&nbsp;id="#contacts"&nbsp;method="POST"&nbsp;class="form"&nbsp;role="form"&nbsp;action="contact.php">
打开App,查看更多内容
随时随地看视频慕课网APP