<?php include_once "assets/includes/autoloader.includes.php"; $User = New User(); $check = $User->checkEmailExist($_POST['email']); $response = array(); $response[] = array('success'=>$check['success']); echo json_encode($response); ?>