When I submit empty fields, it displays "Something has gone wrong" instead of "All fields are required.". Could you help me to find my mistake please.
PHP file:
<?php
if(!isset($_POST['name']) ||
!isset($_POST['email']) ||
!isset($_POST['order'])) {
$data = array(
'message' => "All fields are required."
);
echo json_encode($data);
}
?>