$m = new members(); $l = $m->memberList(); header('Content-type: text/json'); header('Content-type: application/json'); echo json_encode(array('result' => true, 'list' => $l)); break; case "dupecheck": $m = new members(); $l = $m->dupeCheck($p['name']); header('Content-type: text/json'); header('Content-type: application/json'); echo json_encode(array('result' => true, 'count' => $l['total'], 'dupe' => $l['dupe'])); break; case "newUser": $m = new members(); $l = $m->addNew($p); header('Content-type: text/json'); header('Content-type: application/json'); echo json_encode(array('result' => true, 'memno' => $l)); break; case "savereg": $m = new members(); $m->saveInfo($p); header('Content-type: text/json'); header('Content-type: application/json'); echo json_encode(array('result' => true)); break; case "login": $m = new members(); $l = $m->login($p); if (is_array($l)) {