The embedded JavaScript picks up the onblur event of the input field with id username.
It then sends a post request to check.PHP which checks the csv for the filename and returns the result.
The embedded javascript then updates the span element with id usernameResult.