vikaspa Posted March 7, 2007 Share Posted March 7, 2007 Dear All I want to send following form by email.... Can i send it .... Further Can I send auto response (to the person who fills up the form) and in case we need to store the information entered in database what changes I need to make vis-a-vis norm form on web site I am asking this because the form wil be sent via email and will be filled us online and not on my web site Please please please help <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <? $MODULE="enquirys.php"; $SITENAME="sealretailworld.com"; $SITEMAIL="[email protected], [email protected], [email protected]"; include("includes/config.inc.php"); include("includes/getsqlvaluestring.inc.php"); include("includes/class.phpmailer.php"); $FormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $FormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } $showform='Y'; if(isset($_POST['Submit'])){ $showform='N'; echo $showform; $subject="New enquiry has been received on $SITENAME"; $message="Enquiry received on $SITENAME <br><br> The details are given below<br> Name: ".$_POST['name']."<br> Address: ".$_POST['address']."<br> City: ".$_POST['city']."<br> State: ".$_POST['state']."<br> Zip: ".$_POST['zip']."<br> Phone No: ".$_POST['isdt']."-".$_POST['stdt']."-".$_POST['tel']."<br> Mobile : ".$_POST['mobile']."<br> Email Id: ".$_POST['email']."<br> Location Details: ".$_POST['locationdetail']."<br> Franchisee City: ".$_POST['franchiseeforcity']."<br> Carpet Area: ".$_POST['carpetarea']."<br> Experience of retail Shift: ".$_POST['experience']."<br> "; $to = $SITEEMAIL; mail($to, $subject, $message, "From: $email\nReply-To: $email\nContent-Type: text/html;"); $alert="<table cellspacing='0' cellpadding='0'> <tr> <td colspan='3'>Dear ".ucwords($_POST['name']).", </td> </tr> <tr> <td colspan='3'><br> Thank you for visiting our site.<br> Your enquiry has been received, one of our customer support officers will get back to you shortly. <p><br> With Best Regards,<br> Team - ".$SITENAME." <br> </p> </td> </tr> </table>"; $to=$email; mail($to, $subject, $message, "From: $email\nReply-To: $email\nContent-Type: text/html;"); $subject = "You had sent following enquiry on $SITENAME"; $to="[email protected], [email protected], [email protected]"; mail($to, $subject, $message, "From: $email\nReply-To: $email\nContent-Type: text/html;"); } ?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <?php echo $alert; if($showform=='Y'){?> <form method="post" name="contactus" id="contactus" onsubmit="return formCheck(this)"> <table width="90%" border="0" align="center" cellpadding="2" cellspacing="2" id="formtable"> <tr> <td colspan="3" bgcolor="#F1F1ED" id="toptable"><div align="center"> <p class="normalb12"><strong>Franchisee Details Form </strong></p> </div></td> </tr> <tr> <td colspan="3" align="center" bgcolor="#F1F1ED" id="toptable"></td> </tr> <tr id="row"> <td width="28%" bgcolor="#F1F1ED" class="normalb12" id="formcellinfo"><div align="left"><span class="text">Name:<span class="quicklist">*</span></span></div></td> <td width="72%" colspan="2" bgcolor="#F1F1ED" class="text12bb" id="inputcell"><input name="name" type="text" class="input" id="name" value="" /></td> </tr> <tr id="row"> <td bgcolor="#F1F1ED" class="normalb12" id="formcellinfo">Address</td> <td colspan="2" bgcolor="#F1F1ED" class="text12bb" id="inputcell"><label> <textarea name="address" id="address"></textarea> </label></td> </tr> <tr id="row"> <td bgcolor="#F1F1ED" class="normalb12" id="formcellinfo">City</td> <td colspan="2" bgcolor="#F1F1ED" class="text12bb" id="inputcell"><label> <input name="city" type="text" id="city" /> </label></td> </tr> <tr id="row"> <td bgcolor="#F1F1ED" class="normalb12" id="formcellinfo">State</td> <td colspan="2" bgcolor="#F1F1ED" class="text12bb" id="inputcell"><label> <input name="state" type="text" id="state" /> </label></td> </tr> <tr id="row"> <td bgcolor="#F1F1ED" class="normalb12" id="formcellinfo">Zip</td> <td colspan="2" bgcolor="#F1F1ED" class="text12bb" id="inputcell"><label> <input name="zip" type="text" id="zip" size="15" /> </label></td> </tr> <tr id="row"> <td bgcolor="#F1F1ED" class="normalb12" id="formcellinfo">Tel Phone No. </td> <td colspan="2" bgcolor="#F1F1ED" class="text12bb" id="inputcell"><input name="isdt" type="text" value="" size="4"/> - <input name="stdt" type="text" id="stdt" value="" size="7"/> - <input name="tel" type="text" value="" size="14"/></td> </tr> <tr id="row"> <td bgcolor="#F1F1ED" class="normalb12" id="formcellinfo">Mobile</td> <td colspan="2" bgcolor="#F1F1ED" class="text12bb" id="inputcell"><label> <input name="mobile" type="text" id="mobile" /> </label></td> </tr> <tr id="row"> <td bgcolor="#F1F1ED" class="normalb12" id="formcellinfo">Email Id </td> <td colspan="2" bgcolor="#F1F1ED" class="text12bb" id="inputcell"><label> <input name="email" type="text" id="email" /> </label></td> </tr> <tr id="row"> <td bgcolor="#F1F1ED" class="normalb12" id="formcellinfo">Location Details </td> <td colspan="2" bgcolor="#F1F1ED" class="text12bb" id="inputcell"><label> <textarea name="locationdetail" id="locationdetail"></textarea> </label></td> </tr> <tr id="row"> <td bgcolor="#F1F1ED" class="normalb12" id="formcellinfo">Franchisee for which city </td> <td colspan="2" bgcolor="#F1F1ED" class="text12bb" id="inputcell"><label> <input name="franchiseeforcity" type="text" id="franchiseeforcity" /> </label></td> </tr> <tr id="row"> <td bgcolor="#F1F1ED" class="normalb12" id="formcellinfo">Carpet area (Sq. Ft.) </td> <td colspan="2" bgcolor="#F1F1ED" class="text12bb" id="inputcell"><label> <input name="carpetarea" type="text" id="carpetarea" size="12" /> </label></td> </tr> <tr id="row"> <td bgcolor="#F1F1ED" class="normalb12" id="formcellinfo">Experience of Retail Shift(No.of Years). </td> <td colspan="2" bgcolor="#F1F1ED" class="text12bb" id="inputcell"><label> <input name="experience" type="text" id="experience" size="8" /> </label></td> </tr> <tr id="row"> <td height="50" bgcolor="#F1F1ED" class="normalb12" id="formcellinfo"> </td> <td colspan="2" bgcolor="#F1F1ED" class="text12bb" id="inputcell"><span class="normalb11"> </span></td> </tr> <tr id="row"> <td height="64" colspan="3" align="center" bgcolor="#F1F1ED" class="text12bb" id="formcellinfo"><label> <input name="Submit" type="submit" id="submit" value="Submit" align="middle" /> </label></td> </tr> <!-- <tr id="row"> <td id="formcellinfo"><span class="text">Best time to call: </span></td> <td colspan="2" id="inputcell"><select name="time" id="time"> <option value="Morning" >Morning</option> <option value="Afternoon" selected>Afternoon</option> <option value="Weekend" >Weekend</option> </select></td> </tr> --> </table> </form> <?php } ?> </body> </html> Link to comment https://forums.phpfreaks.com/topic/41567-please-help-send-enquiry-form-by-email-and-store-details/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.