<?php
  session_start();
  
  $hostname="localhost";
$user_name="shahid06_bizdir";//user Name of database
$password="sAa6qTtoL76U"; //pasword of databse
 $dbname="shahid06_admin";


$link=mysqli_connect($hostname,$user_name,$password,$dbname);
if(!$link){
    
    echo "Failed to connect to MySQL: " . mysqli_connect_error();
    
    
}
else{
    
    
    echo "";
}

                        	   
                    

  
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Contacts</title>
<meta charset="utf-8">
<meta name = "format-detection" content = "telephone=no" />
<link rel="icon" href="images/favicon.ico">
<link rel="shortcut icon" href="images/favicon.ico" />
<link rel="stylesheet" href="css/contact-form.css">
<link rel="stylesheet" href="css/style.css">
<script src="js/jquery.js"></script>
<script src="js/jquery-migrate-1.1.1.js"></script>
<script src="js/jquery.easing.1.3.js"></script>
<script src="js/script.js"></script> 
<script src="js/superfish.js"></script>
<script src="js/jquery.equalheights.js"></script>
<script src="js/jquery.mobilemenu.js"></script>
<script src="js/tmStickUp.js"></script>
<script src="js/jquery.ui.totop.js"></script>
<!--<script src="js/TMForm.js"></script>
<script src="js/modal.js"></script>-->


<!--[if lt IE 8]>
 <div style=' clear: both; text-align:center; position: relative;'>
   <a href="http://windows.microsoft.com/en-US/internet-explorer/products/ie/home?ocid=ie6_countdown_bannercode">
     <img src="http://storage.ie6countdown.com/assets/100/images/banners/warning_bar_0000_us.jpg" border="0" height="42" width="820" alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today." />
   </a>
</div>
<![endif]-->
<!--[if lt IE 9]>
<script src="js/html5shiv.js"></script>
<link rel="stylesheet" media="screen" href="css/ie.css">
<![endif]-->

</head>

<body>
<!--==============================
              header
=================================-->
<header>
  <div class="header_top">
    <div class="container">
      <div class="row">
        <div class="grid_12">
          <img src="images/site_desc.png" style="width:50%; height:auto;" alt="logo">
        </div>
      </div>
    </div>
  </div>
  <section id="stuck_container">
  <!--==============================
              Stuck menu
  =================================-->
    <div class="container">
      <div class="row">
        <div class="grid_12 ">
          <h1 class="logo">
            <a href="index.php">
              <img src="images/logo2.png" style="width:250px; height:auto;" alt="logo">
            </a>
          </h1>
          <div class="navigation ">
            <nav>
              <ul class="sf-menu">
               <li><a href="index.php">Home</a></li>
               <li><a href="about.php">About</a></li>
               <li><a href="gallery.php">Gallery</a></li>
               <li><a href="http://businessplus.pk/ebiz/">eBiz</a></li>
               <li class="current"><a href="contacts.php">Contacts</a></li>
             </ul>
            </nav>
            <div class="clear"></div>
          </div>       
         <div class="clear"></div>  
        </div>
     </div> 
    </div> 
  </section>
</header>
<!--=====================
          Content
======================-->
<section id="content"><div class="ic">More Website Templates @ TemplateMonster.com - August11, 2014!</div>
  <div class="container">
    <div class="row">
      <div class="grid_12">
        <h2>Contacts</h2>
        <div class="map">
          <figure class="">
            <iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3405.060394119026!2d73.11267121475673!3d31.412462081405426!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x392268725b330195%3A0x41252daea86b04b7!2sKohinoor+One!5e0!3m2!1sen!2s!4v1511166402376" style="border:0"></iframe>
          </figure>
        </div>
      </div>
      <div class="grid_5">
        <h2>Contact Info</h2>
        <p>If you have any questions regarding customization of ask guys from <strong>Business Plus</strong> to help you.</p>
        Business Plus eBiz Magazines<br>
        Suite 197, 1st floor, Koh-e-Noor One, <br>
        Jaranwala Road, Fasialabad<br>
        Telephone: +92 300 815 0445 +92 300 282 8445 <br>
        E-mail: <a href="#">info@businessplus.pk</a>
      </div>
      <div class="grid_6 preffix_1">
        <h2>Contact  Form</h2>
              <form id="contact-form" method="POST">
                    <label class="name">
                      <input type="text" name="name" placeholder="Name:" value="" required />
                    </label>
                   
                    <label class="email">
                      <input type="text" name="email" placeholder="E-mail:" value="" required />
                    </label>
                    <label class="phone">
                      <input type="text" name="phone" placeholder="Phone:" value="" required  />
                    </label>
                   
                    <label class="message">
                      <textarea name="message" placeholder="Message:" required ></textarea>
                    </label>
                    <div class="ta__right">
                      <input type="reset" class="btn" name="reset"  onclick="myFunction()" value="Reset"/>
                      <input type="submit" class="btn" name="submit" value="Send"/>
                    </div>
                 <!--
                 <div class="modal fade response-message">
                    <div class="modal-dialog">
                      <div class="modal-content">
                        <div class="modal-header">
                          <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                          <h4 class="modal-title">Modal title</h4>
                        </div>
                        <div class="modal-body">
                          You message has been sent! We will be in touch soon.
                        </div>      
                      </div>
                    </div>
                  </div> -->
                </form> 
                <?php 
                
                 
                    if(isset($_POST['submit']))
                    {
                        
                        
                        
                        $_name=$_POST['name'];
                        $_email=$_POST['email'];
                        $_phone=$_POST['phone'];
                        $_msg=$_POST['message'];
                        
                        $sql="INSERT INTO Contact (_name,_email,_phone,_msg) VALUES ('$_name','$_email','$_phone','$_msg');";
                        
                         if(mysqli_query($link,$sql)){
                        
                        
                                echo '<script>alert("You message has been sent! We will be in touch soon. :)")</script>';
                            }
                            else
                            {
                                die($link->error.mysqli_connect_error())  ;
                            }
                            mysqli_close($link);
                     }
                   
               
               ?>
               <script>
function myFunction() {
    document.getElementById("contact-form").reset();
}
</script>
      </div>
    </div>
  </div>
</section>
<!--==============================
              footer
=================================-->
<footer id="footer">
  <div class="container">
    <div class="row">
      <div class="grid_12"> 
        <h2>Contacts</h2>
        <div class="footer_phone">+92 300 815 0445    +92 300 282 8445</div><br>
         <div class="footer_phone">businessplusfsd@gmail.com</div>
        <a href="#" class="footer_mail">info@businessplus.pk</a>
        <div class="sub-copy"><strong>Address : </strong><a href="" rel="nofollow">suite 197, 1st floor, Koh-e-Noor One, Jaranwala Road, Fasialabad</a></div>
      </div>
    </div>

  </div>  
</footer>
<a href="#" id="toTop" class="fa fa-chevron-up"></a>
</body>
</html>