function start_action($mysqli, $option = "getIn") { //var_dump($_SERVER); if ($option == "authentication") { $data = testReg($mysqli); } require "templates/start.php"; }
* Created by PhpStorm. * User: lyn * Date: 15/7/10 * Time: 上午10:39 */ header("Content-Type: text/html; charset=utf-8"); require_once "../entity/User.php"; require_once "../config.php"; require_once "../provider/Database.php"; require_once "../action/UserAction.php"; require_once "../provider/testFormat.php"; require_once "../entity/response/Response.php"; require_once "../util/TimeUtils.php"; session_start(); $arr = $_POST; $result = testReg($arr); $myjson = json_encode($result); echo $myjson; function testReg($arr) { $checkFormat = true; $email = $arr["email"]; $psw = $arr["password"]; $username = $arr["username"]; $nickname = "nickname"; $department = "百姓网"; //$nickname = ($_POST["nickname"]); //$department = ($_POST["department"]); $location = $arr["location"]; $description = $arr["taste"]; $testformat = new testFormat();