Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/255.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
can';我不能让我的php为联系人表单工作_Php - Fatal编程技术网

can';我不能让我的php为联系人表单工作

can';我不能让我的php为联系人表单工作,php,Php,我在contact.html页面上创建了我的联系人表单,在表单中放置action=“mail.php”,然后创建了一个mail.php页面。一旦我把我所有的php放在页面上,我的发送按钮就不能工作了。是的,我尝试过让我的contact.html页面contact.php,但我的网站根本无法打开该链接。我用的是原子。 我需要帮助。找朋友 我需要正确的php的联系形式,这样我就可以得到一封电子邮件时,有人提交了一个表单 这是我的Contact.html页面: <!DOCTYPE html&g

我在contact.html页面上创建了我的联系人表单,在表单中放置action=“mail.php”,然后创建了一个mail.php页面。一旦我把我所有的php放在页面上,我的发送按钮就不能工作了。是的,我尝试过让我的contact.html页面contact.php,但我的网站根本无法打开该链接。我用的是原子。 我需要帮助。找朋友

我需要正确的php的联系形式,这样我就可以得到一封电子邮件时,有人提交了一个表单

这是我的Contact.html页面:

 <!DOCTYPE html>
 <html>
 <head>
    <meta charset="utf-8">
    <title>ITA</title>
    <link rel="stylesheet" type="text/css" href="style.css">
    <link href="https://fonts.googleapis.com/css family=Poppins&display=swap" rel="stylesheet">

</head>

<header>

<div class="container">

<img src="../pics/LogoMakr_89l9j5.png" alt="logo" class="logo">

<nav>
  <ul>
      <li><a href="index.html">Home</a></li>
      <li><a href="products.html">Products</a></li>
      <li><a href="about.html">About</a></li>
      <li><a href="contact.html">Contact</a></li>
  </ul>
</nav>

 </div>


 </header>

<form action="mail.php" method="post">

  <body class="contactbgimg">

<div class="contact-form">
  <h1>Contact Us</h1>

<div class="txtb">
  <label>Full Name :</label>
  <input type="text" placeholder="Enter Your Name" required>
</div>

<div class="txtb">
  <label>Email :</label>
  <input type="email" placeholder="Enter Your Email" required>
</div>

<div class="txtb">
  <label>Phone Number :</label>
  <input placeholder="Enter Your Phone Number" required>
</div>

<div class="txtb">
  <label>Message:</label>
   <input type="text" placeholder="Enter Text" required>
  <textarea></textarea>
</div>

<input class="btn" type="submit" value="Send" name="Submit">

</form>

    <script src="index.js"></script>
</body>

</html>

伊塔
联系我们 全名: 电邮: 电话号码: 信息:
您可以尝试以下方法:

1) contact.php

<!DOCTYPE html>
 <html>
 <head>
    <meta charset="utf-8">
    <title>ITA</title>
    <link rel="stylesheet" type="text/css" href="style.css">
    <link href="https://fonts.googleapis.com/css family=Poppins&display=swap" rel="stylesheet">

</head>
<header>

<div class="container">
<img src="../pics/LogoMakr_89l9j5.png" alt="logo" class="logo">
    <nav>
        <ul>
            <li><a href="index.html">Home</a></li>
            <li><a href="products.html">Products</a></li>
            <li><a href="about.html">About</a></li>
            <li><a href="contact.html">Contact</a></li>
        </ul>
    </nav>
</div>
</header>
<body class="contactbgimg">
<form action="mail.php" method="post">
<div class="contact-form">
<h1>Contact Us</h1>

    <div class="txtb">
        <label>Full Name :</label>
        <input type="text" name="fullname" placeholder="Enter Your Name" required>
    </div>

    <div class="txtb">
        <label>Email :</label>
        <input type="email" name="email" placeholder="Enter Your Email" required>
    </div>

    <div class="txtb">
        <label>Phone Number :</label>
        <input type="text" name="contactno" placeholder="Enter Your Phone Number" required>
    </div>

    <div class="txtb">
        <label>Message:</label>
        <input type="text" placeholder="Enter Text" required>
        <textarea></textarea>
    </div>

    <input class="btn" type="submit" name="Submit">
</div>
</form>
<script src="index.js"></script>
</body>

</html>

伊塔
联系我们 全名: 电邮: 电话号码: 信息:
2) mail.php



欢迎来到stackoverflow。请务必向我们展示您目前所拥有的。显示contact.html和mail.php页面。告诉我们到目前为止你都做了些什么。我们无法帮助您了解您提供给我们的信息量。和。PHP是否工作?我不能放图片,因为堆栈溢出不会让我需要图片,只需在您的帖子中发布我们需要知道的所有相关代码和信息。您好。请发布您的HTML,以便我们可以帮助您轻松发布HTML文件
<?php
if(isset($_POST['Submit'])){
    $fullname = $_POST['fullname'];
    $email = $_POST['email'];
    $contactno = $_POST['contactno'];
    //All your Business logic goes here.

    echo "Name : ".$fullname."<br>Email ID :".$email."<br>Contact # :".$contactno;
}

?>