Server : LiteSpeed System : Linux in-mum-web1949.main-hosting.eu 5.14.0-503.40.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 5 06:06:04 EDT 2025 x86_64 User : u595547767 ( 595547767) PHP Version : 7.4.33 Disable Function : NONE Directory : /home/u595547767/domains/stmarysjsocgoldcoast.com/public_html/ |
<?php
if(isset($_POST["btnSubmit"]))
{
$fname = $_POST['fname'];
$lname = $_POST['lname'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$message = $_POST['message'];
$subject='Contact Form Enquiry';
$mailto = "stmarysjcgc@gmail.com";
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
$headers .= 'From: <stmarysjcgc@gmail.com>' . "\r\n";
$body = "
<html><body><table width='100%' border='2' bordercolor='#c8c8c8' cellpadding='10' cellspacing='3' style='font-size:13px; font-family:Arial, Helvetica, sans-serif;' >
<tr>
<td align='left' valign='top'><strong>First Name</strong></td>
<td align='left' valign='top'>".$fname."</td>
</tr>
<tr>
<td align='left' valign='top'><strong>Last Name</strong></td>
<td align='left' valign='top'>".$lname."</td>
</tr>
<tr>
<td align='left' valign='top'><strong>E-mail</strong></td>
<td align='left' valign='top'>".$email."</td>
</tr>
<tr>
<td align='left' valign='top'><strong>Mobile-Number</strong></td>
<td align='left' valign='top'>".$phone."</td>
</tr>
<tr>
<td align='left' valign='top'><strong>Message</strong></td>
<td align='left' valign='top'>".$message."</td>
</tr>
</table>
</body></html>
";
if( mail($mailto,$subject,$body,$headers)){
echo "<script>alert('Thank you for contacting us!');</script>";
echo "<script>window.location = 'index.php';</script>";
}
else{
echo "<script>alert('Failed!');</script>";
}
}
?>