name; if (!$data) { http_response_code(400); } else { $createoutfit = createOutfit($name, $user->id); if ($createoutfit === true) { $createoutfit = "Outfit Created"; } header('Content-Type: application/json'); echo json_encode(array("alert" => $createoutfit)); }