Hello, %s!', htmlspecialchars($user)); echo 'Successful login. Nice to have you back!' . '
Back to form'; $was_successful = true; } else { echo '

Error

Invalid username or password.'; } } if (!$was_successful) { echo '

Login sample

This is a demo form for AuthMe website integration. Enter your AuthMe login details into the following form to test it.
Name
Pass
'; } function get_from_post_or_empty($index_name) { return trim( filter_input(INPUT_POST, $index_name, FILTER_UNSAFE_RAW, FILTER_REQUIRE_SCALAR | FILTER_FLAG_STRIP_LOW) ?: ''); } ?>