我創建了一個HTML表單,沒有任何困難(我對HTML和CSS比較新,但對它們很滿意)。問題是我想要提交按鈕將用戶在表單中輸入的數據發送到我的電子郵件地址。HTML表單使用PHP提交自動電子郵件
我的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:[email protected]"><strong>[email protected]</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處理程序來發送郵件,對嗎? – 2014-10-31 20:36:18