我对php知之甚少,所以我继续使用了他免费设置的一个css-tricks电子邮件表单:http://css-tricks.com/nice-and-simple-contact-form/。
然而,我不知道如何把它进入网站而不破坏php代码。我想我不能简单地取我想要的代码,也就是
<div id="contact-area">
<form method="post" action="contactengine.php">
<label for="Name">Name:</label>
<input type="text" name="Name" id="Name" />
<label for="City">City:</label>
<input type="text" name="City" id="City" />
<label for="Email">Email:</label>
<input type="text" name="Email" id="Email" />
<label for="Message">Message:</label><br />
<textarea name="Message" rows="20" cols="20" id="Message"></textarea>
<input type="submit" name="submit" value="Submit" class="submit-button" />
</form>
<div style="clear: both;"></div>
<p>Check out a <a href="http://css-tricks.com/examples/NiceSimpleContactForm2">version of this</a> with SPAM protection.</p>
</div>
把它放到我的HTML页面中。我尝试使用iframe链接html页面到我的html页面为我的网站,它工作了,但这种方法是可以的吗? 是的,只要所有的网页和css文件都正确链接,你就可以把代码放在你的HTML页面中。和你现在的代码放在同一个文件夹里)
使用i-frame 不是一个好主意,因为它真的会弄乱你的页面和提交表单。