| 34 |
header("Content-Type:application/json; charset=utf-8"); |
header("Content-Type:application/json; charset=utf-8"); |
| 35 |
|
|
| 36 |
// Validate input data |
// Validate input data |
| 37 |
if (!preg_match("/^[A-Za-z][A-Za-z0-9]{4,11}$/", $username)) |
if (!preg_match("/^[A-Za-z][A-Za-z0-9_]{4,11}$/", $username)) |
| 38 |
{ |
{ |
| 39 |
$result_set["return"]["code"] = -1; |
$result_set["return"]["code"] = -1; |
| 40 |
array_push($result_set["return"]["errorFields"], array( |
array_push($result_set["return"]["errorFields"], array( |
| 338 |
|
|
| 339 |
mysqli_close($db_conn); |
mysqli_close($db_conn); |
| 340 |
exit(json_encode($result_set)); |
exit(json_encode($result_set)); |
|
?> |
|