我为我的网站创建了一个联系表单,当我单击提交按钮时,它只显示PHP代码而不是它应该显示的消息,比如用户输入表单的文本信息.
以下是表单的HTML代码:
<html>
<link href="contact.css" rel="stylesheet" type="text/css" />
<head>
<title>Contact Us</title>
</head>
<body>
<form action="contact.php" method="post">
<div id="ContactForm">
<fieldset>
<h4>Contact Parquest:</h4>
<label class="labelone" for="name">Name:</label>
<input name="name"/>
<label for="email">Email: </label>
<input name="email"email"/>
<label for="commens">Comments: </label>
<textarea name="commens"></textarea>
</fieldset>
<fieldset>
<input class="btn" type="submit" value="Send Email"/>
<input class="btn" type="reset" value="Reset Form"/>
</fieldset>
</form>
</div>
</html>
Run Code Online (Sandbox Code Playgroud)
我无法发布PHP代码,因为它只是在我尝试时没有显示,所以继承人截图:http://prntscr.com/79hadk