html5 - PHP form to email -
i have created form on our website online submission of claims our work. have 2 pages associated form. have end .php page thank submission , code post e-mail our business address. when form filled out, , submitted, not recieving e-mail. pretty new coding , first attempt @ creating form. thought had necessary code , .php this. appreciate input on how make form come through in e-mail. form page appears such:
-<!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"> <!-- instancebegin template="templates/main_page.dwt" codeoutsidehtmlislocked="false" --> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <!-- instancebegineditable name="doctitle" --> <title>assignment submission</title> <!--[if lte ie 9]> <style type="text/css" title="ie-style-css"> /* lte ie 9 style*/ </style> <![endif]--> <!-- instanceendeditable --> <link href="stylesheets/reset.css" rel="stylesheet" type="text/css" /> <link href="stylesheets/index.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="scripts/browser-compatibility.js"></script> <!-- instancebegineditable name="head" --> <!-- instanceendeditable --> <script type="text/javascript" src="http://cdn.wibiya.com/toolbars/dir_1424/toolbar_1424727/loader_1424727.js"></script> </head> <body> <noscript> <a href="http://www.wibiya.com/">web toolbar wibiya</a> </noscript> <div class="main_wrapper cf"> <div class="header cf"> <div class="logo_holder cf"></div> <div class="nav_holder cf"> <ul class="hmenubar cf"> <li><a href="index.html" class="clicked" target="_self">home</a> </li> <li><a href="about.html">about</a> </li> <li><a href="services.html">services</a> </li> <li><a href="coverage.html">coverage</a> </li> <li><a href="assignment.html">submit assignment</a> </li> <li><a href="solutions.html">resources</a> </li> <li><a href="contact.html">contact</a> </li> <script type="text/javascript" src="scripts/menu_selection.js"></script> </ul> </div> </div> <div class="content cf"> <!-- instancebegineditable name="contentregion" --> <div class="column_1"> <h2 class="about">assignment submission form</h2> <h2 class="service_text"><font color="#ff0000">please aware experiencing difficulties our online submission form. please contact provide assignment @ time. (xxx) xxx-xxxx. thank you.</font><br /> please complete many fields possible , click submit @ bottom of page. contact confirmation. if not hear within 2 hours of submission, please contact us. </h2> <form id="new_assignment" name="assignment form" method="post" action="result.php" class="assign_form"> <hr /> <h1 class="revtitle" style="color: rgb(157, 72, 61); text-align: left;">client information</h1> <hr /> <p class="paragraph2"> <label>company name:</label> <input name="company" type="text" required="required" form="new_assignment" tabindex="1" style="width:225px" /> <br/> <label>adjuster:</label> <input name="adj" type="text" required="required" form="new_assignment" tabindex="2" style="width:200px" /> <label>e-mail:</label> <input name="email" type="email" required="required" form="new_assignment" tabindex="3" style="width:250px" /> <br/> <label>phone number:</label> <input name="adj_phone_number" type="tel" required="required" form="new_assignment" tabindex="4" style="width:100px" /> <label>extension:</label> <input name="ext" type="text" form="new_assignment" tabindex="5" style="width:40px" /> <label>fax number:</label> <input name="fax" type="tel" form="new_assignment" tabindex="6" style="width:100px" /> </p> <hr /> <div class="claim_info"> <h1 class="revtitle" style="color: rgb(157, 72, 61); text-align: left;">claim information</h1> <hr /> <p class="paragraph2"> <label>assignment type:</label> <select name="assign_type" form="new_assignment" tabindex="7" title="assignment type"> <option value="auto" selected="selected">automobile</option> <option value="rec">recreational</option> <option value="heavy">heavy equipment</option> <option value="property">minor property</option> <option value="audit">estimate audit</option> <option value="scene_invest">scene investigation</option> <option value="arb">arbitration</option> <option value="drp">drp quality control inspection</option> <option value="photos">photos only</option> </select> <label>type of loss:</label> <select name="loss_type" form="new_assignment" tabindex="8" title="loss type"> <option value="coll">collision</option> <option value="comp">comprehensive</option> <option value="other">other</option> </select> <br/> <label>claim #:</label> <input name="claim_#" type="text" required="required" form="new_assignment" tabindex="9" style="width:225px" /> <label>policy #:</label> <input name="policy_#" type="text" form="new_assignment" tabindex="10" style="width:150px" /> <br/> <label>deductible: </label> <input name="deductible" type="text" form="new_assignment" tabindex="11" style="width:100px" /> <label>date of loss: </label> <input name="dol" type="date" form="new_assignment" tabindex="12" style="width:150px" /> <br /> </p> <div class="insd_info"> <label>insured:</label> <input name="insured" type="text" required="required" form="new_assignment" tabindex="13" style="width:200px" /> <br/> <label>address:</label> <input name="insd_address" type="text" form="new_assignment" tabindex="14" style="width:275px" /> <br/> <label>city:</label> <input name="insd_city" type="text" form="new_assignment" tabindex="15" style="width:120px" /> <label>state:</label> <select name="insd_state" form="new_assignment" tabindex="16" title="insured state"> <option value="al">al</option> <option value="ak">ak</option> <option value="az">az</option> <option value="ar">ar</option> <option value="ca">ca</option> <option value="co">co</option> <option value="ct">ct</option> <option value="de">de</option> <option value="fl">fl</option> <option value="ga">ga</option> <option value="hi">hi</option> <option value="id">id</option> <option value="il">il</option> <option value="in">in</option> <option value="ia">ia</option> <option value="ks">ks</option> <option value="ky">ky</option> <option value="la">la</option> <option value="me">me</option> <option value="md">md</option> <option value="ma">ma</option> <option value="mi" selected="selected">mi</option> <option value="mn">mn</option> <option value="ms">ms</option> <option value="mo">mo</option> <option value="mt">mt</option> <option value="ne">ne</option> <option value="nv">nv</option> <option value="nh">nh</option> <option value="nj">nj</option> <option value="nm">nm</option> <option value="ny">ny</option> <option value="nc">nc</option> <option value="nd">nd</option> <option value="oh">oh</option> <option value="ok">ok</option> <option value="or">or</option> <option value="pa">pa</option> <option value="ri">ri</option> <option value="sc">sc</option> <option value="sd">sd</option> <option value="tn">tn</option> <option value="tx">tx</option> <option value="ut">ut</option> <option value="vt">vt</option> <option value="va">va</option> <option value="wa">wa</option> <option value="wv">wv</option> <option value="wi">wi</option> <option value="wy">wy</option> </select> <br/> <label>zip code:</label> <input name="insd_zip" type="text" form="new_assignment" tabindex="17" style="width:130px" /> <br/> <label>home phone:</label> <input name="insd_home" type="tel" form="new_assignment" tabindex="18" style="width:140px" /> <br/> <label>work phone:</label> <input name="insd_work" type="tel" form="new_assignment" tabindex="19" style="width:140px" /> <br/> <label>mobile phone:</label> <input name="insd_mobile" type="tel" form="new_assignment" tabindex="20" style="width:140px" /> <br/> <label>other phone:</label> <input name="insd_other" type="tel" form="new_assignment" tabindex="21" style="width:140px " /> <br/> </div> <div class="claimant_info "> <label>claimant:</label> <input name="claimant " type="text " required="required " form="new_assignment " tabindex="22" style="width:200px " /> <br/> <label>address:</label> <input name="claimant_address " type="text " form="new_assignment " tabindex="23" style="width:275px " /> <br/> <label>city:</label> <input name="claimant_city " type="text " form="new_assignment " tabindex="24" style="width:120px " /> <label>state:</label> <select name="claimant_state " form="new_assignment " tabindex="25" title="claimant state "> <option value="al ">al</option> <option value="ak ">ak</option> <option value="az ">az</option> <option value="ar ">ar</option> <option value="ca ">ca</option> <option value="co ">co</option> <option value="ct ">ct</option> <option value="de ">de</option> <option value="fl ">fl</option> <option value="ga ">ga</option> <option value="hi ">hi</option> <option value="id ">id</option> <option value="il ">il</option> <option value="in ">in</option> <option value="ia ">ia</option> <option value="ks ">ks</option> <option value="ky ">ky</option> <option value="la ">la</option> <option value="me ">me</option> <option value="md ">md</option> <option value="ma ">ma</option> <option value="mi " selected="selected">mi</option> <option value="mn ">mn</option> <option value="ms ">ms</option> <option value="mo ">mo</option> <option value="mt ">mt</option> <option value="ne ">ne</option> <option value="nv ">nv</option> <option value="nh ">nh</option> <option value="nj ">nj</option> <option value="nm ">nm</option> <option value="ny ">ny</option> <option value="nc ">nc</option> <option value="nd ">nd</option> <option value="oh ">oh</option> <option value="ok ">ok</option> <option value="or ">or</option> <option value="pa ">pa</option> <option value="ri ">ri</option> <option value="sc ">sc</option> <option value="sd ">sd</option> <option value="tn ">tn</option> <option value="tx ">tx</option> <option value="ut ">ut</option> <option value="vt ">vt</option> <option value="va ">va</option> <option value="wa ">wa</option> <option value="wv ">wv</option> <option value="wi ">wi</option> <option value="wy ">wy</option> </select> <br/> <label>zip code:</label> <input name="claimant_zip " type="text " form="new_assignment " tabindex="26" style="width:130px " /> <br/> <label>home phone:</label> <input name="claimant_home " type="tel " form="new_assignment " tabindex="27" style="width:140px " /> <br/> <label>work phone:</label> <input name="claimant_work " type="tel " form="new_assignment " tabindex="28" style="width:140px " /> <br/> <label>mobile phone:</label> <input name="claimant_mobile " type="tel " form="new_assignment " tabindex="29" style="width:140px " /> <br/> <label>other phone:</label> <input name="claimant_other" type="tel" form="new_assignment" tabindex="30" style="width:140px" /> </div> </div> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br /> <hr /> <h1 class="revtitle" style="color: rgb(157, 72, 61); text-align: left;">vehicle information</h1> <hr /> <p class="paragraph2"> <label>owner of vehicle inspected: </label> <select name="owner_type" form="new_assingments" tabindex="31" style="width:160px"> <option value="insd" selected="selected">insured</option> <option value="clmt">claimant</option> </select> <br /> <label>year: </label> <input name="veh_year" type="text" for="new_assignment" tabindex="32" style="width:80px" /> <label>make: </label> <input name="veh_make" type="text" form="new_assignment" tabindex="33" style="width:100px" /> <label>model: </label> <input name="veh_model" type="text" form "new_assigment" tabindex="34" style="width:100px" /> <label>color: </label> <input name="veh_color" type="text" form="new_assignment" tabindex="35" style="width:100px" /> <br/> <label>vin: </label> <input name="veh_vin" type="text" form="new_assignment" tabindex="36" style="width:200px" /> <label>license plate: </label> <input name="lic_plate" type="text" form="new_assignment" tabindex="37" style="width:100px" /> <label>state:</label> <select name="license_state " form="new_assignment " tabindex="38" title="license state "> <option value="al ">al</option> <option value="ak ">ak</option> <option value="az ">az</option> <option value="ar ">ar</option> <option value="ca ">ca</option> <option value="co ">co</option> <option value="ct ">ct</option> <option value="de ">de</option> <option value="fl ">fl</option> <option value="ga ">ga</option> <option value="hi ">hi</option> <option value="id ">id</option> <option value="il ">il</option> <option value="in ">in</option> <option value="ia ">ia</option> <option value="ks ">ks</option> <option value="ky ">ky</option> <option value="la ">la</option> <option value="me ">me</option> <option value="md ">md</option> <option value="ma ">ma</option> <option value="mi ">mi</option> <option value="mn ">mn</option> <option value="ms ">ms</option> <option value="mo ">mo</option> <option value="mt ">mt</option> <option value="ne ">ne</option> <option value="nv ">nv</option> <option value="nh ">nh</option> <option value="nj ">nj</option> <option value="nm ">nm</option> <option value="ny ">ny</option> <option value="nc ">nc</option> <option value="nd ">nd</option> <option value="oh ">oh</option> <option value="ok ">ok</option> <option value="or ">or</option> <option value="pa ">pa</option> <option value="ri ">ri</option> <option value="sc ">sc</option> <option value="sd ">sd</option> <option value="tn ">tn</option> <option value="tx ">tx</option> <option value="ut ">ut</option> <option value="vt ">vt</option> <option value="va ">va</option> <option value="wa ">wa</option> <option value="wv ">wv</option> <option value="wi ">wi</option> <option value="wy ">wy</option> </select> <br/> <label>description of loss: </label> <textarea name="desc_of_loss" id="desc_of_loss" form="new_assignment" tabindex="39" style="width:500px"></textarea> <br /> <label>description of damage: </label> <textarea name="desc_of_dmg" id="desc_of_dmg" form="new_assignment" tabindex="40" style="width:500px"></textarea> <br /> </p> <hr /> <h1 class="revtitle" style="color: rgb(157, 72, 61); text-align: left;">vehicle location</h1> <hr /> <p class="paragraph2"> <label>location name: </label> <input name="location_name" type="text" form="new_assignment" style="width:250px" tabindex="41" value="with owner" /> <br /> <label>address: </label> <input name="location_address" type="text" form="new_assignment" style="width:300px" tabindex="42" value="(same owner above)" /> <br /> <label>city:</label> <input name="insd_city" type="text" form="new_assignment" tabindex="43" style="width:120px" /> <label>state:</label> <select name="insd_state" form="new_assignment" tabindex="44" title="insured state"> <option value="al">al</option> <option value="ak">ak</option> <option value="az">az</option> <option value="ar">ar</option> <option value="ca">ca</option> <option value="co">co</option> <option value="ct">ct</option> <option value="de">de</option> <option value="fl">fl</option> <option value="ga">ga</option> <option value="hi">hi</option> <option value="id">id</option> <option value="il">il</option> <option value="in">in</option> <option value="ia">ia</option> <option value="ks">ks</option> <option value="ky">ky</option> <option value="la">la</option> <option value="me">me</option> <option value="md">md</option> <option value="ma">ma</option> <option value="mi" selected="selected">mi</option> <option value="mn">mn</option> <option value="ms">ms</option> <option value="mo">mo</option> <option value="mt">mt</option> <option value="ne">ne</option> <option value="nv">nv</option> <option value="nh">nh</option> <option value="nj">nj</option> <option value="nm">nm</option> <option value="ny">ny</option> <option value="nc">nc</option> <option value="nd">nd</option> <option value="oh">oh</option> <option value="ok">ok</option> <option value="or">or</option> <option value="pa">pa</option> <option value="ri">ri</option> <option value="sc">sc</option> <option value="sd">sd</option> <option value="tn">tn</option> <option value="tx">tx</option> <option value="ut">ut</option> <option value="vt">vt</option> <option value="va">va</option> <option value="wa">wa</option> <option value="wv">wv</option> <option value="wi">wi</option> <option value="wy">wy</option> </select> <br/> <label>zip code: </label> <input name="insd_zip" type="text" form="new_assignment" tabindex="45" style="width:130px" /> <label>contact: </label> <input name="location_contact" type="text" form="new_assignment" tabindex="46" style="width:150px" /> <br/> </p> <hr /> <input type="reset" class="button" /> <input name="submit" type="submit" class="button" form="new_assignment" formaction="/result.php" formenctype="multipart/form-data" formmethod="post" value="submit" /> <p></p> <div class="important" id="important"> <label>trojan</label> <input type="text" name="trojan" id="trojan" /> </div> </form> </div> <!-- instanceendeditable --> </div> <div class="footer cf"> <p class="rights">lmc insurance services, inc - 2013 rights reserved | <a class="privacy" href="/privacy_policy.html" target="_self">privacy policy</a> </p> </div> </div> </body> <!-- instanceend --> </html>
and .php results page appears as:
<!doctype html> <html> <head> <meta charset="utf-8"> <title>submission</title> </head> <body> <?php //checks if bot if($_post['trojan']!=''); die("changed field"); $adj = $_post['adj']; $company = $_post['company']; $email = $_post['email']; $adj_phone = $_post['adj_phone_number']; $ext = $_post['ext']; //sending email form owner $header = "from: $email\n" . "relpy-to: $email\n"; $subject = "new assignment website"; $email_to = "office@example.com"; $message = "we recieved new assignment $adj \n" . "they can reached @ $adj_phone $ext \n" . "their e-mail address $email \n"; mail($email_to,$subject,$message,$header); ?> <h1>thank submission!</h1> <p>your information has been sent, , our office contact verify assignment , confirm special instructions.</p> <p>we thank utilizing our services. hope complete assignment in timely manner.</p> </body> </html>
any , appreciated.
remove ;
from
if($_post['trojan']!=''); ^ here
because think following statement executed every time semicolon make following line independent of if
statement
die("changed field");
Comments
Post a Comment