<?php



	  

	  $name=$_POST['name'];

	  $mobile=$_POST['mobile'];	

	  $email=$_POST['email'];

	  $subj=$_POST['subj'];

	  $message=$_POST['message'];	

	  

	  

	  if ( !empty($name) && !empty($mobile) ) 

		{ 

			  $addresses = ['gjpradeepkumar@gmail.com'];

			  $subject ='WERT DIGITAL - ENQUIRY';

			  $msg ="

					 Name		: $name \n

					 Mobile		: $mobile\n

					 E-mail		: $email\n

					 Requirement: $subj\n

					 Message 	: $message\n";	  



			  foreach($addresses as $address){

				if( mail($address,$subject,$msg) )

				{

					echo "<script>

							alert('Thanks for your enquiry. We will revert back soon...!');

							window.location.href='index.html';

						  </script>";

				}

				else

				{

					echo "<script>

							alert('Sorry, there has been an error...!');

							window.location.href='index.html';

						  </script>";

				}

				} 	  

		} 

?>