<?php
if(isset($_POST['submit']))
{

//////////mail start from here
$to ='info@igsbpo.in';
$subject = "Contact us from data";
$message = "&nbsp;";
$message .= '<br/><br/>
<table width="600" border="0" style="border:1px solid #ddd; padding:0px; background:#ffff; " align="center" cellpadding="0" cellspacing="0" >


<tbody>





<tr>
<td width="27%" align="left" style="font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#333; font-weight:bold;" >Name: </td>
<td width="73%" align="left" valign="top" style="padding:10px 0px 10px 0px; font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#333">'.ucfirst($_POST['name']).'</td>
</tr>

<tr>
<td width="27%" align="left" style="font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#333; font-weight:bold;" >Email: </td>
<td width="73%" align="left" valign="top" style="padding:10px 0px 10px 0px; font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#333">'.$_POST['email'].'</td>
</tr>

<tr>
<td width="27%" align="left" style="font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#333; font-weight:bold;" >Contact Number: </td>
<td width="73%" align="left" valign="top" style="padding:10px 0px 10px 0px; font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#333">'.$_POST['phone'].'</td>
</tr>


<tr>
<td width="27%" align="left" style="font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#333; font-weight:bold;" >Message: </td>
<td width="73%" align="left" valign="top" style="padding:10px 0px 10px 0px; font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#333">'.$_POST['message'].'</td>
</tr>



<tr>
<td colspan="2" align="center">&nbsp;</td>
</tr>
</tbody>

</table><br><br><br>';
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'from:'.'<info@igsbpo.in>'. "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);


echo "<script>alert('Your details has been submitted successfully! Thank you for contacting us.')</script>";

echo '<script>location.href="index.php";</script>';


}