"Send Enquiry (Contact Us page)"
Bootstrap 3.3.0 Snippet by h2paca

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <?php include_once "includes/config.php"; $sel_headerpages = dbQuery("select * from menu where p_parentpage ='0' and show_on = 1 and active = 1 and landingpages = 0 ") ; $contact = dbQuery("select * from contact where active =1"); $fetch_contact=dbFetchArray($contact); $menu = dbQuery("select * from menu where p_parentpage ='0' and show_on = 1 and active = 1 and landingpages = 0 ") ; $fetch_menu=dbFetchArray($menu); ; ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="keyword" content=""> <meta name="author" content=""> <link rel="icon" href="../../favicon.ico"> <title>Contact Us</title> <link href="css/bootstrap.css" rel="stylesheet"> <link href="css/main.css" rel="stylesheet"> <link href="css/font-awesome.css" rel="stylesheet"> <link href="css/flexslider.css" rel="stylesheet"> <link href="css/hover-effect.css" rel="stylesheet"> <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic|Source+Sans+Pro:400,300,300italic,600,400italic,600italic|Homenaje' rel='stylesheet' type='text/css'> <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <?php include "headercms.php"; $contact1 = dbQuery("select * from contact where active =1"); $fetch_contact1=dbFetchArray($contact1); ?> <?php $from = $_POST['email']; // sender //$message = $_POST['query']; $subject = "General Enquiry"; $message = '<html> <body bgcolor="#573A28" topmargin="25"> <table> <tr><td colspan="2" width="402" style="font-style:italic; font-weight:bold">Hello Sir/Mam,</td></tr> <tr><td colspan="2">Enquiry Form</td></tr> </tr> <tr><td width="402" style="font-style:italic; font-weight:bold">Name*</td> <td style="font-style:italic; font-weight:bold"> ' . $_POST['fname'] . ' </td> </tr> <tr><td width="402" style="font-style:italic; font-weight:bold">Phone Number</td> <td style="font-style:italic; font-weight:bold"> ' . $_POST['phone1'] . ' </td></tr> <tr><td width="402" style="font-style:italic; font-weight:bold">Email</td> <td style="font-style:italic; font-weight:bold"> ' . $_POST['email'] . ' </td></tr> <tr><td width="402" style="font-style:italic; font-weight:bold">Query</td> <td style="font-style:italic; font-weight:bold"> ' . $_POST['query'] . ' </td></tr> </table> </body> </html>'; $header = "From: $from \r\n"; $header .= "MIME-Version: 1.0 \r\n"; $header .= "Content-type: text/html; charset=UTF-8 \r\n"; $success=''; if(isset($_POST["submit"])) { $to = "naimansari.in@gmail.com "; mail($to,$subject,$message,$header); echo '<script language="javascript">'; echo 'alert(Your Inquiry has been Sent!!)'; echo '</script>'; } ?> <script type="text/javascript"> function preparedata1() { var x=document.forms["form1"]["email"].value; var atpos=x.indexOf("@"); var dotpos=x.lastIndexOf("."); if (document.form1.fname.value=="") { document.form1.fname.className = document.form1.fname.className + " error"; document.getElementById("errn").innerHTML = "   Please Enter Your Name."; document.form1.fname.focus(); return false; } else { document.getElementById("errn").style.display="none"; } if (document.form1.email.value=="") { document.form1.email.className = document.form1.email.className + " error"; document.getElementById("erre").innerHTML = "   Please Enter Your Email Address."; document.form1.email.focus(); return false; } else if(atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length) { document.form1.email.className = document.form1.email.className + " error"; document.getElementById("erre").innerHTML = "   Please Enter Your Correct Email Address."; document.getElementById("email").focus(); return false; } else { document.getElementById("erre").style.display="none"; } if(isNaN(document.form1.phone1.value)) { document.form1.phone1.className = document.form1.phone1.className + " error"; document.getElementById("errp1").innerHTML = "   is not a number."; document.form1.phone1.focus(); return false; } else { document.getElementById("errp1").style.display="none"; } if (document.form1.query.value=="") { document.form1.query.className = document.form1.query.className + " error"; document.getElementById("errq").innerHTML = "   Please Enter Your Query."; document.form1.query.focus(); return false; } else { document.getElementById("errq").style.display="none"; } // document.form1.submit(); } </script> <div class="page-header"> <h1>Contact Us</h1> </div> <section class="main"> <div class="container"> <div class="row contact-us"> <div class="col-md-6"> <?php echo $fetch_contact1['contactdetails']; ?> <form name="form1" method="post" onsubmit="return preparedata1();" > <div class="form-group"><div id="errn" style="color:red; font-size:12px; display:inline "></div> <input type="text" class="form-control" name="fname" id="fname" placeholder="Enter Name"> </div> <div class="form-group"><div id="erre" style="color:red; font-size:12px; display:inline "></div> <input type="email" class="form-control" name="email" id="email" placeholder="Enter email"> </div> <div class="form-group"><div id="errp1" style="color:red; font-size:12px; display:inline "></div> <input type="text" class="form-control" name="phone1" id="phone1" placeholder="Mobile No"> </div> <div class="form-group"><div id="errq" style="color:red; font-size:12px; display:inline "></div> <textarea class="form-control" name="query" id="query" placeholder="Type your query"></textarea> </div> <button type="submit" name="submit" id="submit" class="btn btn-default">Submit</button><?php if(isset($success)){ echo $success; } ?> </form> </div> <div class="col-md-6"> <iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d96817.6887330845!2d-74.55044699999995!3d40.68382200000001!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x89c3bd03395a63ed%3A0x9ae696318bbefc77!2sAstrahealth+Urgent+Care!5e0!3m2!1sen!2sin!4v1428910572976" width="100%" height="500px" frameborder="0" style="border:0"></iframe> </div> </div> </div> </section> <?php include"footer.php";?>

Related: See More


Questions / Comments: