I have a small form but I'm not understanding how to send it to an email using PHP. There seems to be different techniques. If someone could just code my small form so I can analyze it and take it from there. Thank you in advance!!!
HTML form:
<form method="post" action="">
<p>
<input type="hidden" name="recipient" value="dew02d@yahoo.com" />
<input type="hidden" name="subject" value="test feedback" />
<input type="hidden" name="redirect" value="main.html" />
</p>
<p style="font-family:Arial, Helvetica, sans-serif; color:#FFF; font-size:12px;
font-weight:bold"><label>First Name:
<input type="text" name="First Name" size="30" maxlength="30"
style="margin-left:27px" />
</label></p>
<p style="font-family:Arial, Helvetica, sans-serif; color:#FFF; font-size:12px;
font-weight:bold"><label>Last Name:
<input type="text" name="Last Name" size="30" maxlength="30"
style="margin-left:27px" />
</label></p>
<p style="font-family:Arial, Helvetica, sans-serif; color:#FFF; font-size:12px;
font-weight:bold"><label>Phone Number:
<input type="text" name="Phone Number" size="30" maxlength="10"
style="margin-left:5px" />
</label></p>
<p style="font-family:Arial, Helvetica, sans-serif; color:#FFF; font-size:12px;
font-weight:bold"><label>Email:
<input type="text" name="Email" size="30" maxlength="30"
style="margin-left:59px" />
</label></p>
<p style="margin-top:19px; margin-left:244px;">
<input type="submit" value="submit" />
</p>
</form>
Use this
Submit simple form, loop and send mail?
Only one thing, set your to and subject in php
Ans set form action to this page.
This is best I found and you can use for any field in form.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.