Html 我如何制作一个提交按钮,将信息发送到我的电子邮件?

Html 我如何制作一个提交按钮,将信息发送到我的电子邮件?,html,Html,我正在做一个调查,让我的老师分发给全班(他不知道怎么做,我知道的比他多) 我的问题是我不太熟悉HTML,不知道如何让我的提交按钮工作 这是我的密码: <html> <h2> Please fill this out as feedback. </h2> <body> <form> <form method="post" action='mailto:example_email@hostname.com'> <i

我正在做一个调查,让我的老师分发给全班(他不知道怎么做,我知道的比他多)

我的问题是我不太熟悉HTML,不知道如何让我的提交按钮工作

这是我的密码:

<html>
<h2>
    Please fill this out as feedback.
</h2>
<body>
<form>
<form method="post" action='mailto:example_email@hostname.com'>
<input type="hidden" name="Re" value="survey">
<td>On a scale of 1-10, how well did you understand this tutorial?</td><br>
<td>
    <input type="radio" value="1" name="q1">1
    <input type="radio" value="2" name="q1">2
    <input type="radio" value="3" name="q1">3
    <input type="radio" value="4" name="q1">4
    <input type="radio" value="5" name="q1">5
    <input type="radio" value="6" name="q1">6
    <input type="radio" value="7" name="q1">7
    <input type="radio" value="8" name="q1">8
    <input type="radio" value="9" name="q1">9
    <input type="radio" value="10" name="q1">10
</td>
<br>
<br>
<td>On a scale of 1-10, how much previous knowledge did you have before this tutorial?</td><br>
<td>
    <input type="radio" value="1" name="q2">1
    <input type="radio" value="2" name="q2">2
    <input type="radio" value="3" name="q2">3
    <input type="radio" value="4" name="q2">4
    <input type="radio" value="5" name="q2">5
    <input type="radio" value="6" name="q2">6
    <input type="radio" value="7" name="q2">7
    <input type="radio" value="8" name="q2">8
    <input type="radio" value="9" name="q2">9
    <input type="radio" value="10" name="q2">10
</td>
<br>
<br>
<td>On a scale of 1-10, how comfortable do you think your skills are with the knowledge you learned?</td><br>
<td>
    <input type="radio" value="1" name="q3">1
    <input type="radio" value="2" name="q3">2
    <input type="radio" value="3" name="q3">3
    <input type="radio" value="4" name="q3">4
    <input type="radio" value="5" name="q3">5
    <input type="radio" value="6" name="q3">6
    <input type="radio" value="7" name="q3">7
    <input type="radio" value="8" name="q3">8
    <input type="radio" value="9" name="q3">9
    <input type="radio" value="10" name="q3">10
</td>
<br>
<br>
<td>On a scale of 1-10, how likely are you to ever use HTML again?</td><br>
<td>
    <input type="radio" value="1" name="q4">1
    <input type="radio" value="2" name="q4">2
    <input type="radio" value="3" name="q4">3
    <input type="radio" value="4" name="q4">4
    <input type="radio" value="5" name="q4">5
    <input type="radio" value="6" name="q4">6
    <input type="radio" value="7" name="q4">7
    <input type="radio" value="8" name="q4">8
    <input type="radio" value="9" name="q4">9
    <input type="radio" value="10" name="q4">10
</td>
<br>
<br>
<td>On a scale of 1-10, did you enjoy taking part in this?</td><br>
<td>
    <input type="radio" value="1" name="q5">1
    <input type="radio" value="2" name="q5">2
    <input type="radio" value="3" name="q5">3
    <input type="radio" value="4" name="q5">4
    <input type="radio" value="5" name="q5">5
    <input type="radio" value="6" name="q5">6
    <input type="radio" value="7" name="q5">7
    <input type="radio" value="8" name="q5">8
    <input type="radio" value="9" name="q5">9
    <input type="radio" value="10" name="q5">10
</td>
<br>
<br>
Please include your thoughts, sugestions, or questions here:<BR>
<TEXTAREA NAME="Comments" ROWS="6" COLS="50"></TEXTAREA>
<br>
<br>

<td><input type="submit" value="Send"></td>
</form>
</body>

请填写此项作为反馈。
在1-10的范围内,您对本教程的理解程度如何?
1. 2. 3. 4. 5. 6. 7. 8. 9 10

在1-10的范围内,您在本教程之前有多少知识?
1. 2. 3. 4. 5. 6. 7. 8. 9 10

在1-10分的范围内,您认为您的技能与您所学的知识相适应程度如何?
1. 2. 3. 4. 5. 6. 7. 8. 9 10

在1-10的范围内,您再次使用HTML的可能性有多大?
1. 2. 3. 4. 5. 6. 7. 8. 9 10

在1-10分的范围内,你喜欢参加这个活动吗?
1. 2. 3. 4. 5. 6. 7. 8. 9 10

请在此处包含您的想法、建议或问题:


我很抱歉,如果它是凌乱的,我只是想把它放在一起,我不是很好的HTML,因为它是

我举了个例子_email@hostname.com,我有我真正的电子邮件


谢谢

首先删除重复的
标记

<form><!-- remove this -->
<form method="post" action='mailto:example_email@hostname.com'>

如果您只是尝试呼叫用户的电子邮件客户端发送电子邮件,您可以执行以下操作:

<form action='mailto:example_email@hostname.com' method="post" enctype="text/plain">

除此之外,您还需要某种服务器端语言来处理提交的数据

以下是您可以在PHP中执行的操作:

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


您的代码中有一些语法错误。您正在使用
标记2次。您应该删除第一个
标记

此外,您还应该在
表单中添加
enctype=“text/plain”
,在这种情况下,我更喜欢php。 在这里,一个很棒的教程


您还可以从下载并签出此源代码。

这样您就比您的老师了解更多,但您不熟悉HTML?酷。我的老师没有教这些东西,所以我给他买了。那么我该如何在我的代码中实现这些呢?@user2462068你现在应该使用email方法。至于PHP方法,您需要一个能够运行PHP的服务器/主机。在实现此功能之前,您可能需要学习HTML和PHP的基础知识。应该有很多关于使用PHP处理表单的教程。
<?php
// You can retrieve the values this way. You may want to sanitize the input as well.
$question1 = $_POST['q1'];
$question2 = $_POST['q2'];
$question3 = $_POST['q3'];
$question4 = $_POST['q4'];
$question5 = $_POST['q5'];
$question6 = $_POST['q6'];
$comments  = $_POST['Comments'];
?>