HTML PHP联系表单 - 提交按钮不工作?还是PHP问题? [英] HTML PHP Contact Form - Submit Button Not Working? Or PHP Issue?

查看:120
本文介绍了HTML PHP联系表单 - 提交按钮不工作?还是PHP问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

希望你能帮忙,我正在尝试为我的网站打造一个HTML格式的联系表格,使用CSS和PHP发送的邮件。

 < form class =formaction =webform.phpmethod =post> 
< h1>联络表单:< / h1>
< label>
< span>您的名称:< / span>< input id =nametype =textname =name/>
< / label>

< label>
< span>电子邮件地址:< / span>< input id =emailtype =textname =email/>
< / label>

< label>
< span> Subject:< / span>< input id =subjecttype =textname =subject/>
< / label>

< label>
< span>讯息< / span>< / textarea>反馈"名称="反馈">< / textarea>
< input id =buttontype =buttonvalue =Submit Form/>
< / label>
< / form>

任何人都可以帮助我,如果有必要,可以提供链接到我的网站。



欣赏任何帮助:)

解决方案

您应该使用submit作为按钮类型

 < input id =buttontype =submitvalue =Submit Form/> 

小提琴演示


Hope you can help, I am trying to knock up a contact form for my website which is HTML, styled with CSS and the email sent with PHP.

<form class="form" action="webform.php" method="post">
    <h1>Contact Form:</h1>
    <label>
    <span>Your Name:</span><input id="name" type="text" name="name" />
    </label>

    <label>
    <span>Email Address:</span><input id="email" type="text" name="email" />
    </label>

    <label>
    <span>Subject:</span><input id="subject" type="text" name="subject" />
    </label>

    <label>
    <span>Message</span><textarea id="feedback" name="feedback"></textarea>
    <input id="button" type="button" value="Submit Form" />
    </label>
</form>

Anyone help me out, can provide the link to my site if necessary.

Appreciate any help :)

解决方案

You should use submit as the button type

<input id="button" type="submit" value="Submit Form" />

Fiddle DEMO

这篇关于HTML PHP联系表单 - 提交按钮不工作?还是PHP问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆