【发布时间】:2014-11-01 13:41:37
【问题描述】:
我创建了一个 HTML 表单,没有任何困难(我对 HTML 和 CSS 比较陌生,但对它们很熟悉)。问题是我希望提交按钮将用户在表单中输入的数据发送到我的电子邮件地址。
我的 PHP 知识几乎不存在,我完全陷入困境。如果有人有耐心提供帮助,将不胜感激。
这是表单的代码...
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Life Academy | Pre-course questionnaire</title>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="pcq.css">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700,800' rel='stylesheet' type='text/css'>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div id="formbg">
<div id="formcontent">
<img src="pcqlogo.png" class="logo">
<p><strong>Retirement Planning Course<br>Anonymous Pre-course Questionnaire</strong><br>So that the course may more accurately reflect your interests and possible concerns, we would like you to complete and return this questionnaire before the start of the course, by email, to<br> <a href="mailto:info@life-academy.co.uk"><strong>info@life-academy.co.uk</strong>.</a></p>
<form>
Age<br> <input type="text" name="age"><br>
Years with present/last company<br> <input type="text" name="yearswithcompany"><br>
Leaving Date<br> <input type="text" name="leavingdate"><br>
Job Role<br> <input type="text" name="role"><br>
Do you have a company or occupational pension plan?<br>
<input id="yes" type="radio" name="companypension" value="yes">
<label for="yes">Yes</label>
<input id="no" type="radio" name="companypension" value="no">
<label for="no">No</label><br>
Do you have a personal (private) pension plan?<br>
<input id="yes" type="radio" name="personalpension" value="yes">
<label for="yes">Yes</label>
<input id="no" type="radio" name="personalpension" value="no">
<label for="no">No</label><br>
What would you like to gain from this course? Please describe in detail.<br> <textarea name="liketogain" class="largetextbox"></textarea><br>
What are your main activities outside of work?<br> <input type="text" name="activities"><br>
How do you think these activities will develop/change in the near future?<br> <textarea name="activitiesdevelop" class="largetextbox"></textarea><br>
Have you any concerns about the future? If so, list them here:<br> <textarea name="futureconcerns" class="largetextbox"></textarea><br>
Do you want to make changes to your health/lifestyle? If so, please describe the changes.<br> <textarea name="healthlifestylechanges" class="largetextbox"></textarea><br>
How would you like the emphasis of your life to change in the future with respect to work/voluntary activity?<br> <textarea name="work" class="largetextbox"></textarea><br>
Do you have any dietary requirements?<br> <input type="text" name="diet"><br>
Do you have any other special requirements?<br> <textarea name="special" class="largetextbox"></textarea><br>
<input type="submit" value"submit">
</form>
</div>
</div>
</body>
</html>
【问题讨论】:
-
...换句话说,您正在寻找一个 PHP 处理程序来发送邮件,对吗?