
<?php 
error_reporting(0);

include('db_connect.php');
$response = array(); 
if(isset($_POST["email_address"])){
	$email_address = $_POST['email_address'];
    $password = $_POST['password'];
        $token = $_POST['token'];
        $name = $_POST['name'];
 $query="INSERT INTO `users`(`email_address`, `password`, `name`, `token`) VALUES ('$email_address','$password','$name','$token')";
  if(mysqli_query($conn,$query)){
   $response['error'] = false; 
			$response['message'] = "User added successfully";

  }else{
   	$response['error'] = true; 
			$response['message'] = "Some error occurred please try again";	
  }
}else{
	echo "error";
}
    echo json_encode($response);
mysqli_close($conn);
?>