zapper13 Posted March 11, 2009 Share Posted March 11, 2009 Hey guys out there. Please help me with this. I have created a web form using dreamweaver cs4 and the codings are as pasted below. However, i am a noob at php coding and can't seem to get this form to work. Everytime i click on submit, it successfully goes to the thank you page but no email is sent. <body> <div id="PAGEBORDER"> <div id="kimhoelogo">KIM HOE CORPORATION</div> <div id="formborder"> <form action="commercialformprocess.php" method="post" name="form1" id="form1" onsubmit="MM_validateForm('floorarearequirement','','R','approximateleaseperiod','','R','approximatecommencementdate','','R','name','','R','contactno','','R','email','','RisEmail');return document.MM_returnValue"> <table width="600" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="20" colspan="2" class="titleforform"><u>Please submit the following information and we will be in touch with you shortly.</u></td> </tr> <tr> <td height="20"> </td> <td height="20"> </td> </tr> <tr> <td width="280" height="20">Type of leasable space you are interested in:</td> <td width="320" height="20"><span id="spryselect1"> <select name="typeofleasablespaceyouareinterestedin" id="typeofleasablespaceyouareinterestedin" onchange="MM_jumpMenu('parent',this,0)"> <option value="contactus/form/commercialform/commercialform.html">Commercial</option> <option value="contactus/form/residentialform/residentialform.html">Residential</option> <option value="contactus/form/industrialform/industrialform.html">Industrial</option> </select> <span class="selectRequiredMsg">Please select an item.</span></span></td> </tr> <tr> <td height="20"> </td> <td height="20"> </td> </tr> <tr> <td height="20">Preferred location:</td> <td height="20"><span id="spryselect2"> <label> <select name="preferredlocation" id="preferredlocation"> <option>Select one</option> <option value="Kim Hoe Centre @ Kelantan Lane">Kim Hoe Centre @ Kelantan Lane</option> <option value="Kim Hoe Point @ Kelantan Lane">Kim Hoe Point @ Kelantan Lane</option> <option value="Kim Hoe Plaza @ Aljunied">Kim Hoe Plaza @ Aljunied</option> <option value="Lam Soon @ Hillview">Lam Soon @ Hillview</option> <option value="Valiant @ Aljunied">Valiant @ Aljunied</option> </select> </label> <span class="selectRequiredMsg">Please select an item.</span></span></td> </tr> <tr> <td height="20"> </td> <td height="20"> </td> </tr> <tr> <td height="20">Floor area requirement:</td> <td height="20"><label> <input name="floorarearequirement" type="text" id="floorarearequirement" size="25" /> </label></td> </tr> <tr> <td height="20"> </td> <td height="20"> </td> </tr> <tr> <td height="20">Approximate lease period:</td> <td height="20"><label> <input name="approximateleaseperiod" type="text" id="approximateleaseperiod" size="25" /> </label></td> </tr> <tr> <td height="20"> </td> <td height="20"> </td> </tr> <tr> <td height="20">Approximate commencement date:</td> <td height="20"><label> <input name="approximatecommencementdate" type="text" id="approximatecommencementdate" size="25" /> </label></td> </tr> <tr> <td height="20"> </td> <td height="20"> </td> </tr> <tr> <td height="20">Name:</td> <td height="20"><label> <input name="name" type="text" id="name" size="50" /> </label></td> </tr> <tr> <td height="20"> </td> <td height="20"> </td> </tr> <tr> <td height="20">Contact No.:</td> <td height="20"><label> <input name="contactno" type="text" id="contactno" size="25" /> </label></td> </tr> <tr> <td height="20"> </td> <td height="20"> </td> </tr> <tr> <td height="20">Email:</td> <td height="20"><label> <input name="email" type="text" id="email" size="50" /> </label></td> </tr> <tr> <td height="20"> </td> <td height="20"> </td> </tr> <tr> <td height="20">How did you hear about us?:</td> <td height="20"><span id="spryselect3"> <label> <select name="howdidyouhearaboutus" id="howdidyouhearaboutus"> <option>Select one</option> <option value="st701.com">st701.com</option> <option value="www.orangetee.com">www.orangetee.com</option> <option value="sg.88db.com">sg.88db.com</option> <option value="www.iproperty.com.sg">www.iproperty.com.sg</option> <option value="Others please specify">Others please specify</option> </select> </label> <span class="selectRequiredMsg">Please select an item.</span></span></td> </tr> <tr> <td height="20"> </td> <td height="20"> </td> </tr> <tr> <td height="20">Others please specify here:</td> <td height="20"><label> <input name="otherspleasespecifyhere" type="text" id="otherspleasespecifyhere" size="25" /> </label></td> </tr> <tr> <td height="20"> </td> <td height="20"> </td> </tr> <tr> <td height="20"><label> <div align="right"></div> </label></td> <td height="20"><label> <input type="reset" name="reset" id="reset" value="Reset" /> <input type="submit" name="submit" id="submit" value="Submit" /> </label></td> </tr> </table> </form> </div> </div> <script type="text/javascript"> <!-- var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1", {validateOn:["blur", "change"]}); var spryselect2 = new Spry.Widget.ValidationSelect("spryselect2", {validateOn:["blur", "change"]}); var spryselect3 = new Spry.Widget.ValidationSelect("spryselect3", {validateOn:["blur", "change"]}); //--> </script> </body> Quote Link to comment Share on other sites More sharing options...
zapper13 Posted March 11, 2009 Author Share Posted March 11, 2009 the php coding that i currently have is <?php /* Subjects and Email Variables */ $emailSubject = 'Leasing Projects Enquiries'; $webMaster = 'vagenteh@yahoo.com'; /* Gathering Date Variables */ $typeofleasablespaceyouareinterestedin = $_POST['typeofleasablespaceyouareinterestedin']; $preferredlocation = $_POST['preferredlocation']; $floorarearequirement = $_POST['floorarearequirement']; $approximateleaseperiod = $_POST['approximateleaseperiod']; $approximatecommencementdate = $_POST['approximatecommencementdate']; $name = $_POST['name']; $contactno = $_POST['contactno']; $email = $_POST['email']; $howdidyouhearaboutus = $_POST['howdidyouhearaboutus']; $otherspleasespecifyhere = $_POST['otherspleasespecifyhere']; $body = <<<EOD <br><hr><br> Type of leasable space: $typeofleasablespaceyouareinterestedin <br> Preferred location: $preferredlocation <br> Floor area requirement: $floorarearequirement <br> Approximate lease period: $approximateleaseperiod <br> Approximate commencement period: $approximatecommencementdate <br> Name: $name <br> Contact No: $contactno <br> Email: $email <br> How did you hear about us: $howdidyouhearaboutus <br/> Others please specify: $otherspleasespecifyhere <br> EOD; $headers = "From: $email\r\n"; $headers .= "Content-type: text/html\r\n"; mail( "$webMaster", "$emailSubject", "$body", "$headers"); header( "Location: http://www.kimhoe.com/thankyou.html" ); ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.