<?php 
include 'config.php';
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;

require 'PHPMailer/src/Exception.php';
require 'PHPMailer/src/PHPMailer.php';
require 'PHPMailer/src/SMTP.php';

$msg = "";

	if (isset($_POST['submit'])) {
		$name = trim($_POST['name']);
		$email = trim($_POST['email']);
		$message = trim($_POST['message']);
		$address = trim($_POST['address']);
		$number = trim($_POST['number']);
		$state = trim($_POST['state']);

		if (empty($name) || empty($email) || empty($message) || empty($address) || empty($number) || empty($state)) {
			echo "";
		}else{

			$mail = new PHPMailer(true);

			try {
		       //Server settings
		       $mail->SMTPDebug = 0; // Enable verbose debug output
		       $mail->isSMTP(); // Set mailer to use SMTP
		       $mail->Host = $host; // Specify main and backup SMTP servers
		       $mail->SMTPAuth = true; // Enable SMTP authentication
		       $mail->Username = $username; // SMTP username
		       $mail->Password = $password; // SMTP password
		       $mail->SMTPSecure = 'tls'; // Enable TLS encryption, [ICODE]ssl[/ICODE] also accepted
		       $mail->Port = 587; // TCP port to connect to

		      //Recipients
		       $mail->setFrom($username, "Contact");
		       $mail->addAddress($username, $email); // Add a recipient

		      // Content
		       $mail->isHTML(true); 
		       $mail->Subject = 'Message from Contact form';
		       $mail->Body = '
		          <TABLE>
		             <TR>
		                <TD>Name</TD>
		                <TD>'.$name.'</TD>
		             </TR>
		             <TR>
		                <TD>email</TD>
		                <TD>'.$email.'</TD>
		             </TR>
		             <TR>
		                <TD>number</TD>
		                <TD>'.$number.'</TD>
		             </TR>
		             <TR>
		                <TD>state</TD>
		                <TD>'.$state.'</TD>
		             </TR>
					<TR>
		                <TD>Address</TD>
		                <TD>'.$address.'</TD>
		             </TR>
		             <TR>
		                <TD>Message </TD>
		                <TD>'.$message.'</TD>
		             </TR>

		            </TABLE>
		         ';

		        $send = $mail->send();
		        if($send){

		         $message = 'Your message has been sent';
		        }

		        } catch (Exception $e) {
		         echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
		     }
		}

	}


 ?>
	
<!DOCTYPE html>
	<html lang="en">
	
<!-- Mirrored from html.themexriver.com/fastrans/contact.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 23 Nov 2021 23:50:16 GMT -->
<head>
		<meta charset="UTF-8">
		<title>Contact</title>
		<meta name="description" content="RoyalSafety - Logistics & Delivery Company">
		<meta name="keywords" content="cargo, clean, contractor, corporate, freight, industry, localization, logistics, page builder, shipment, transport, transportation, truck, trucking">
		<meta name="author" content="Themexriver">
		<link rel="shortcut icon" href="assets/img/logo/ficon.png" type="image/x-icon">
		<!-- Mobile Specific Meta -->
		<meta name="viewport" content="width=device-width, initial-scale=1">

		<link rel="stylesheet" href="assets/css/bootstrap.min.css">
		<link rel="stylesheet" href="assets/css/fontawesome-all.css">
		<link rel="stylesheet" href="assets/css/flaticon.css">
		<link rel="stylesheet" href="assets/css/animate.css">
		<link rel="stylesheet" href="assets/css/nice-select.css">
		<link rel="stylesheet" href="assets/css/video.min.css">
		<link rel="stylesheet" href="assets/css/animated-slider.css">
		<link rel="stylesheet" href="assets/css/jquery.mCustomScrollbar.min.css">
		<link rel="stylesheet" href="assets/css/slick.css">
		<link rel="stylesheet" href="assets/css/rs6.css">
		<link rel="stylesheet" href="assets/css/slick-theme.css">
		<link rel="stylesheet" href="assets/css/style.css">
	</head>
	<body>
		<div id="preloader"></div>
		<div class="up">
			<a href="#" class="scrollup text-center"><i class="fas fa-chevron-up"></i></a>
		</div>
<!-- Start of header section
	============================================= -->
	<header id="ft-header" class="ft-header-section header-style-two">
		<div class="ft-header-top">
			<div class="container">
				<div class="ft-header-top-content d-flex justify-content-between align-items-center">
					<div class="ft-header-top-cta ul-li">
						<ul>
							<li><i class="fal fa-envelope"></i>info@royalsafetydelivery.com</li>
							<!-- <li><i class="fal fa-map-marker-alt"></i> </li> -->
						</ul>
					</div>
					<div class="ft-header-cta-info d-flex">
						<!-- <div class="ft-header-cta-icon d-flex justify-content-center align-items-center">
							<i class="flaticon-call"></i>
						</div>
						<div class="ft-header-cta-text headline pera-content">
							<p>Get In Touch</p>
							<h3>+90 154 456 784</h3>
						</div> -->
					</div>
				</div>
			</div>
		</div>
		<div class="ft-header-main-menu-wrapper">
			<div class="container">
				<div class="ft-header-main-menu-area position-relative">
					<div class="ft-header-main-menu d-flex align-items-center justify-content-between position-relative">
						<div class="ft-site-logo-area">
							<div class="ft-site-logo position-relative">
								<a href="index.php"><img src="assets/img/logo/royalsafety.png" width="150"  alt=""></a>
							</div>
						</div>
						<div class="ft-header-main-menu d-flex justify-content-end align-items-center">
							<nav class="ft-main-navigation clearfix ul-li">
								<ul id="ft-main-nav" class="nav navbar-nav clearfix">
									<li>
										<a href="index.php">Home</a>
										
									</li>
									<li><a href="about.html">About</a></li>
									<li>
										<a href="service.html">Service</a>
										
									</li>
									<li>
										<a href="contact.php">Contact</a>

									</li>

								</ul>
							</nav>
							<div class="ft-header-cta-btn">
								<a class="d-flex justify-content-center align-items-center" href="index.php#div-id">Track</a>
							</div>
						</div>
					</div>
					<div class="mobile_menu position-relative">
						<div class="mobile_menu_button open_mobile_menu">
							<i class="fal fa-bars"></i>
						</div>
						<div class="mobile_menu_wrap">
							<div class="mobile_menu_overlay open_mobile_menu"></div>
							<div class="mobile_menu_content">
								<div class="mobile_menu_close open_mobile_menu">
									<i class="fal fa-times"></i>
								</div>
								<div class="m-brand-logo">
									<a href="%21.html#"><img src="assets/img/logo/logo4.png" alt=""></a>
								</div>
								<nav class="mobile-main-navigation  clearfix ul-li">
<ul id="ft-main-nav" class="nav navbar-nav clearfix">
									<li>
										<a href="index.php">Home</a>
										
									</li>
									<li><a href="about.html">About</a></li>
									<li>
										<a href="service.html">Service</a>
										
									</li>
									<li>
										<a href="contact.php">Contact</a>

									</li>

								</ul>
								</nav>
							</div>
						</div>
						<!-- /Mobile-Menu -->
					</div>
				</div>
			</div>
		</div>
	</header>
<!-- End of header section
	============================================= -->

<!-- Start of Breadcrumb section
	============================================= -->
	<section id="ft-breadcrumb" class="ft-breadcrumb-section position-relative" data-background="assets/img/bg/bread-bg.jpg">
		<span class="background_overlay"></span>
		<span class="design-shape position-absolute"><img src="assets/img/shape/tmd-sh.png" alt=""></span>
		<div class="container">
			<div class="ft-breadcrumb-content headline text-center position-relative">
				<h2>Contact</h2>
				<div class="ft-breadcrumb-list ul-li">
					<ul>
						<li><a href="#">Home</a></li>
						<li>Contact</li>
					</ul>
				</div>
			</div>
		</div>
	</section>	
<!-- End of Breadcrumb section
	============================================= -->

<!-- Start of contact page section
	============================================= -->
	<section id="ft-contact-page" class="ft-contact-page-section page-padding">
		<div class="container">
			<div class="ft-contact-page-content">
				<div class="row">
					<div class="col-lg-6">
						<div class="ft-contact-page-text-wrapper">
							<div class="ft-section-title-2 headline pera-content">
								<span class="sub-title">Get a Quote</span>
								<h2>Get in Touch And We’ll  Help
									Your Business
								</h2>
							</div>
							<div class="ft-contact-page-contact-info">
								<div class="ft-contact-cta-items d-flex">
									<div class="ft-contact-cta-icon d-flex align-items-center justify-content-center">
										<i class="fal fa-map-marker-alt"></i>
									</div>
									<div class="ft-contact-cta-text headline pera-content">
										<h3>Office address</h3>
										<p>Digital Agency Network 20 Eastbourne
										Terrace London W2 6LG</p>
									</div>
								</div>
								<!-- <div class="ft-contact-cta-items d-flex">
									<div class="ft-contact-cta-icon d-flex align-items-center justify-content-center">
										<i class="fas fa-phone-alt"></i>
									</div>
									<div class="ft-contact-cta-text headline pera-content">
										<h3>Telephone number</h3>
										<p>(408) 389-5470</p>
										<p>(408) 456-5470</p>
									</div>
								</div> -->
								<div class="ft-contact-cta-items d-flex">
									<div class="ft-contact-cta-icon d-flex align-items-center justify-content-center">
										<i class="far fa-envelope"></i>
									</div>
									<div class="ft-contact-cta-text headline pera-content">
										<h3>Mail address</h3>
										
										<p>info@royalsafetydelivery.com</p>
									</div>
								</div>
							</div>
						</div>
					</div>
					<div class="col-lg-6">
						<h4><?php echo $msg ?></h4>
						<div class="ft-contact-page-form-wrapper headline">
							<h3 class="text-center">Contact Us</h3>
							<form action="contact.php" method="Post">
								<div class="row">
									<div class="col-lg-6">
										<input type="text" name="name" required placeholder=" Name">
									</div>
									<div class="col-lg-6">
										<input type="email" name="email" required placeholder=" Email">
									</div>
									<div class="col-lg-6">
										<input type="number" name="number" placeholder="Phone Number">
									</div>
									<div class="col-lg-6">
										<input type="text" name="address" placeholder="House Address">
									</div>
									
									<div class="col-lg-12">
										<input type="text" name="state" placeholder="State">
									</div>

									<div class="col-lg-12">
										<textarea name="message" required placeholder="Your Message"></textarea>
									</div>
									<div class="col-lg-12">
										<button name="submit" type="submit"> Send</button>
									</div>
								</div>
							</form>
						</div>
					</div>
				</div>
			</div>
		</div>
	</section>		
<!-- End of contact page section
	============================================= -->	

<!-- Start of Footer   section
	============================================= -->
	<br>
	<footer id="ft-footer-2" class="ft-footer-section-2" data-background="assets/img/bg/f-bg.png">
		<div class="ft-footer-copywrite-2 text-center">
			<span>Copyright @ 2021 Royal Safety. All Rights Reserved</span>
		</div>
	</footer>	
<!-- End of FAQ why choose  section
	============================================= -->	


	<!-- For Js Library -->
	<script src="assets/js/jquery.min.js"></script>
	<script src="assets/js/bootstrap.min.js"></script>
	<script src="assets/js/popper.min.js"></script>
	<script src="assets/js/jquery.magnific-popup.min.js"></script>
	<script src="assets/js/appear.js"></script>
	<script src="assets/js/slick.js"></script>
	<script src="assets/js/jquery.counterup.min.js"></script>
	<script src="assets/js/waypoints.min.js"></script>
	<script src="assets/js/jquery.nice-select.min.js"></script>
	<script src="assets/js/jquery.mCustomScrollbar.concat.min.js"></script>
	<script src="assets/js/wow.min.js"></script>
	<script src="assets/js/imagesloaded.pkgd.min.js"></script>
	<script src="assets/js/jquery.filterizr.js"></script>
	<script src="assets/js/rbtools.min.js"></script>
	<script src="assets/js/jquery.cssslider.min.js"></script>
	<script src="assets/js/rs6.min.js"></script>
	<script src="assets/js/knob.js"></script>
	<script src="assets/js/script.js"></script>
	<script src="assets/js/gmaps.min.js"></script>
	<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDk2HrmqE4sWSei0XdKGbOMOHN3Mm2Bf-M&amp;ver=2.1.6"></script>
</body>

<!-- Mirrored from html.themexriver.com/fastrans/contact.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 23 Nov 2021 23:50:16 GMT -->
</html>			