Hi, My name is jai and I am trying to code a contact form in php all is going well but I am unable to get data in my email which I am filling in this form please help me. my php code is below
<?php
header('Content-type: application/json');
$status = array(
'type'=>'success',
'message'=>'Thank you for contact us. As early as possible we will contact you '
);
$name = @trim(stripslashes($_POST['name']));
$email = @trim(stripslashes($_POST['email']));
$subject = @trim(stripslashes($_POST['subject']));
$message = @trim(stripslashes($_POST['message']));
$email_from = $email;
$email_to = 'jai.5025@gmail.com';//replace with your email
$body = "Name:$name \n\n Email: $email \n\n Subject: $subject \n\n Message: $message";
$success = @mail($email_to, $subject, $body, 'From: <'.$email_from.'>');
echo json_encode($status);
die;
?>