| 22 |
header("Content-Type:application/json; charset=utf-8"); |
header("Content-Type:application/json; charset=utf-8"); |
| 23 |
|
|
| 24 |
// Validate input data |
// Validate input data |
| 25 |
if (!preg_match("/^[A-Za-z][A-Za-z0-9]{2,11}$/", $username)) |
if (!preg_match("/^[A-Za-z][A-Za-z0-9_]{4,11}$/", $username)) |
| 26 |
{ |
{ |
| 27 |
$result_set["return"]["code"] = -1; |
$result_set["return"]["code"] = -1; |
| 28 |
array_push($result_set["return"]["errorFields"], array( |
array_push($result_set["return"]["errorFields"], array( |
| 288 |
|
|
| 289 |
mysqli_close($db_conn); |
mysqli_close($db_conn); |
| 290 |
exit(json_encode($result_set)); |
exit(json_encode($result_set)); |
|
?> |
|