Sending form data what's the problem?

Is the upload script, but come empty field, tell me, what's the problem???
Here is the code:
<?php
 header('Content-type: application/json');
 $status = array(
'type'=-->'success',
 'message'=>'Your message sent successfully '
);

 $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 = 'navinetx@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;
September 19th 19 at 12:20
2 answers
September 19th 19 at 12:22
A similar case was in Odessa
September 19th 19 at 12:24
Thank you. The problem was javascript base... he couldn't get the data =)
Please tell me how to solved the problem with javascript? - emmanuelle_Purdy commented on September 19th 19 at 12:27

Find more questions by tags AJAXPHPHTMLCSS