fbsql_change_user() changes the logged in user of the specified connection. If the new user and password authorization fails, the current connected user stays active.
The new user name.
The new user password.
If specified, this will be the default or current database after the user has been changed.
If optional and not specified, the function will try to find an open link to the FrontBase server and if no such link is found it will try to create one as if fbsql_connect() was called with no arguments