<form id="superheroForm" action="submit.php" method="post">
<p><i>Please complete the form. Mandatory fields are marked with a </i><em>*</em></p>
<fieldset>
<legend>Contact Details</legend><br>
<label for="Name">Name <em>*</em></label>
<input id="name" name="name" placeholder="Jane " autofocus required><br>
<label for="telephone">Telephone <em>*</em></label>
<input id="telephone" placeholder="(xxx) xxx-xxxx" title="must be in the following format (xxx)-xxx-xxxx"
pattern=[0-9]{3}-[0-9]{3}-[0-9]{4} required><br>
<label for="email">Email <em>*</em></label>
<input id="email" type="email" required><br><br>
</fieldset>
</form>
我有另一个名为submit.php的文件。一旦提交申请用户点击按钮,我应该得到的PHP回应是这样的:
感谢您提交表单
名称:
电话:
如何使用php输出HTML5格式的详细信息
到目前为止,我这个直接在试图新文件命名submit.php但它并没有在所有的工作:这是我的PHP代码:
<html>
Welcome <?php echo $_GET["name"]; ?><br>
Your email address is: <?php echo $_GET["email"]; ?>
</html>
</body>
更新:解决方案:对不起,我没有正确安装PHP。
哪里是'',为什么会有一个额外的''
我你的PHP代码 –
无后顾之忧亲密。 –