提交按钮不起作用
问题描述:
我是新的网页设计师,并使用Dreamweaver与我联系。当我上传博客时,提交按钮不起作用,WordPress的技术支持说我应该在html页面中编辑空白代码。有人可以帮助我吗? 这是我的HTML页面(contact.html):提交按钮不起作用
<td width="49%" height="336" align="left" valign="middle">
<form id="form1" name="form1" method="post" action=" wp-includes/pluggable.php">
<p>
<label for="name">Name</label>
<input type="text" name="name" id="name" />
</p>
<p> </p>
<p>
<label for="email">Email</label>
<input type="text" name="email" id="email" />
</p>
<p><br />
Comment<br />
<textarea name="comment" id="comment" cols="45" rows="5"></textarea>
</p>
<p>
<input type="submit" name="submit" id="submit" value="Submit" />
<input type="reset" name="reset" id="reset" value="Reset" />
</p>
</form></td>
,这里是我的PHP页面:(WP-包括/ pluggable.php)我刚进入有我的电子邮件地址:
// From email and name
// If we don't have a name from the input headers
if (!isset($from_name))
$from_name = 'WordPress';
/* If we don't have an email from the input headers default to [email protected]$sitename
* Some hosts will block outgoing mail from this address if it doesn't exist but
* there's no easy alternative. Defaulting to admin_email might appear to be another
* option but some hosts may refuse to relay mail from an unknown domain. See
* http://trac.wordpress.org/ticket/5007.
*/
if (!isset($from_email)) {
// Get the site domain and get rid of www.
$sitename = strtolower($_SERVER['SERVER_NAME']);
if (substr($sitename, 0, 4) == 'www.') {
$sitename = substr($sitename, 4);
}
$from_email = '[email protected]' . $sitename;
}
答
尝试从表单中的作用卸下空间:
<form id="form1" name="form1" method="post" action=" wp-includes/pluggable.php">
应该是这样的:
<form id="form1" name="form1" method="post" action="wp-includes/pluggable.php">
+0
是的,空格谋杀(有时) – 2013-03-21 03:23:01
+0
谢谢,但仍然无法正常工作。 :( – 2013-03-21 03:59:39
这是您的完整/完整代码吗? – 2013-03-21 03:16:36
而“不工作”意味着什么? – 2013-03-21 03:17:48
对于你的'if(!isset($ from_name))',你不用打开和关闭大括号'{}''。 – 2013-03-21 03:18:37