小编Den*_*ski的帖子

当我按下提交按钮时,php联系表单返回php代码

我为我的网站创建了一个联系表单,当我单击提交按钮时,它只显示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

html php forms

7
推荐指数
1
解决办法
1万
查看次数

标签 统计

forms ×1

html ×1

php ×1