html - Use Submit button to send form data to an email -
i browsing around internet , created consensus form. layout , want it.what id when user clicks submit button contents of form sent email example somemail@mail.com
can me please.this useful me. thank you
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>goodjob - badjob - tenerife</title> <link rel="stylesheet" type="text/css" href="view.css" media="all"> <script type="text/javascript" src="view.js"></script> </head> <body id="main_body" > <img id="top" src="top.png" alt=""> <div id="form_container"> <h1><a>good - bad - hmm</a></h1> <form id="form_1136056" class="appnitro" method="post" action=""> <div class="form_description"> <h2>goodjob - badjob - tenerife</h2> <p>it's anonymous. keep information real. don't make things up. if ever going change, needs real information. form sent email address , posted anonymously on facebook you.</p> </div> <ul > <li id="li_1" > <label class="description" for="element_1">what alias want use </label> <div> <input id="element_1" name="element_1" class="element text medium" type="text" maxlength="255" value=""/> </div><p class="guidelines" id="guide_1"><small>you don't have use real name - remember alias facebook comments</small></p> </li> <li id="li_8" > <label class="description" for="element_8">is ...... </label> <span> <input id="element_8_1" name="element_8" class="element radio" type="radio" value="1" /> <label class="choice" for="element_8_1">bad job</label> <input id="element_8_2" name="element_8" class="element radio" type="radio" value="2" /> <label class="choice" for="element_8_2">good job</label> </span> </li> <li id="li_6" > <label class="description" for="element_6">what name of workplace want tell about? </label> <div> <input id="element_6" name="element_6" class="element text medium" type="text" maxlength="255" value=""/> </div><p class="guidelines" id="guide_6"><small>type in name of business</small></p> </li> <li id="li_16" > <label class="description" for="element_16">where business located? </label> <div> <input id="element_16" name="element_16" class="element text medium" type="text" maxlength="255" value=""/> </div><p class="guidelines" id="guide_16"><small>type in town, or can find business on google maps , click on share , copy link , paste here.</small></p> </li> <li id="li_7" > <label class="description" for="element_7">if want mention bosses name, put here. </label> <div> <input id="element_7" name="element_7" class="element text medium" type="text" maxlength="255" value=""/> </div><p class="guidelines" id="guide_7"><small>type in name of boss</small></p> </li> <li id="li_15" > <label class="description" for="element_15">if know personal facebook page can copy , paste in here </label> <div> <input id="element_15" name="element_15" class="element text large" type="text" maxlength="255" value=""/> </div><p class="guidelines" id="guide_15"><small>go top address bar of boss/owner want tag post. select text , paste in box.</small></p> </li> <li id="li_9" > <label class="description" for="element_9">how many hours week work? </label> <span> <input id="element_9_1" name="element_9" class="element radio" type="radio" value="1" /> <label class="choice" for="element_9_1">1 10</label> <input id="element_9_2" name="element_9" class="element radio" type="radio" value="2" /> <label class="choice" for="element_9_2">10 20</label> <input id="element_9_3" name="element_9" class="element radio" type="radio" value="3" /> <label class="choice" for="element_9_3">20 30</label> <input id="element_9_4" name="element_9" class="element radio" type="radio" value="4" /> <label class="choice" for="element_9_4">30 40</label> <input id="element_9_5" name="element_9" class="element radio" type="radio" value="5" /> <label class="choice" for="element_9_5">40 50</label> <input id="element_9_6" name="element_9" class="element radio" type="radio" value="6" /> <label class="choice" for="element_9_6">50 hours plus</label> </span><p class="guidelines" id="guide_9"><small>keep real. </small></p> </li> <li id="li_18" > <label class="description" for="element_18">exactly how many hours work? </label> <div> <input id="element_18" name="element_18" class="element text medium" type="text" maxlength="255" value=""/> </div> </li> <li id="li_11" > <label class="description" for="element_11">does job pay hours? </label> <span> <input id="element_11_1" name="element_11" class="element radio" type="radio" value="1" /> <label class="choice" for="element_11_1">yes</label> <input id="element_11_2" name="element_11" class="element radio" type="radio" value="2" /> <label class="choice" for="element_11_2">no</label> </span> </li> <li id="li_10" > <label class="description" for="element_10">what type of contract have? </label> <span> <input id="element_10_1" name="element_10" class="element radio" type="radio" value="1" /> <label class="choice" for="element_10_1">part time</label> <input id="element_10_2" name="element_10" class="element radio" type="radio" value="2" /> <label class="choice" for="element_10_2">full time</label> <input id="element_10_3" name="element_10" class="element radio" type="radio" value="3" /> <label class="choice" for="element_10_3">hourly per week</label> <input id="element_10_4" name="element_10" class="element radio" type="radio" value="4" /> <label class="choice" for="element_10_4">dont know</label> </span><p class="guidelines" id="guide_10"><small>don't guess..this crucial. every worker must have copy of contract. if don't have 1 ask boss or go employment office (sepe) credentials , tell there contract have.</small></p> </li> <li id="li_12" > <label class="description" for="element_12">did holiday pay? </label> <span> <input id="element_12_1" name="element_12" class="element radio" type="radio" value="1" /> <label class="choice" for="element_12_1">yes</label> <input id="element_12_2" name="element_12" class="element radio" type="radio" value="2" /> <label class="choice" for="element_12_2">no</label> </span> </li> <li id="li_17" > <label class="description" for="element_17">how holiday pay did get? </label> <div> <input id="element_17" name="element_17" class="element text medium" type="text" maxlength="255" value=""/> </div><p class="guidelines" id="guide_17"><small>a number no symbols or text</small></p> </li> <li id="li_13" > <label class="description" for="element_13">did know there 14 months in spanish working year? </label> <span> <input id="element_13_1" name="element_13" class="element radio" type="radio" value="1" /> <label class="choice" for="element_13_1">yes</label> <input id="element_13_2" name="element_13" class="element radio" type="radio" value="2" /> <label class="choice" for="element_13_2">no</label> </span><p class="guidelines" id="guide_13"><small>its true, in spain ins 14 month pay scheme, double pay in summer , christmas. employers incorporate these 2 payments within monthly wage...meaning less :)</small></p> </li> <li id="li_14" > <label class="description" for="element_14">got story tell job? bad or - let rip here!</label> <div> <textarea id="element_14" name="element_14" class="element textarea large"></textarea> </div> </li> <li class="buttons"> <input type="hidden" name="form_id" value="1136056" /> <input id="saveform" class="button_text" type="submit" name="submit" value="submit" /> </li> </ul> </form> <div id="footer"> copyright goodjob-badjob - visit facebook page <a href="https://www.facebook.com/groups/xxxxxxxxxxxxxxxxx/" target="new">click here</a> </div> </div> <img id="bottom" src="bottom.png" alt=""> </body> </html>
use php.redirect action php file in server. example mail.php
<form method="post" action="mail.php">
and in php file use these
<?php $element1 = $_post['element_1']; $element8 = $_post['element_8']; $element6 = $_post['element_6']; $formcontent="from: $element1 \n message: $element81, business located? element6, blah blah blah"; $recipient = "youremail@email.com"; $subject = "contact form"; $mailheader = "from: $element1 \r\n"; mail($recipient, $subject, $formcontent, $mailheader) or die("error!"); echo "<script type='text/javascript'>alert('mail sent successfully!')</script>"; ?>
and add fields form. added some. edit formcontent message want.