If you have small number of users you do not need to create databases, just create a file (with extension .php so as not be able to see it with browser, everyone). If not you have to create databases, and create a PHP script that make queries to validate the users. Do you need exactly the queries that create the database?