Files
IZYIM-Prototype/demo/username_checker.php
2018-03-23 09:55:42 +08:00

8 lines
381 B
PHP

<?php
$username = $_REQUEST["username"];
if ($username == 'user1' || $username == 'user2') {
echo json_encode(array('status' => 'OK', 'message' => 'Username <b>' . $username . '</b> is available. You can just pick it up!'));
} else {
echo json_encode(array('status' => 'ERROR', 'message' => 'Username <b>' . $username . '</b> is not available. Please choose another one.'));
}
?>