Good day.

Sorry to explain on the fingers ...
Bordered user access to the folder via .htaccess and .hpasswd. Authorization occurs through some special program, which I, unfortunately, do not have. Now you need to drag all user accounts into the SQlit database.

Which way to dig, so that logins and passwords are pulled through .htaccess from the database?
As far as I read, .htaccess does not understand variables.

    2 answers 2

    The authorization you are writing about is HTTP authorization. It can be implemented using php - there are examples. To check the login-password pair provided by the user, already contact your database.

    And do not forget to remove authorization lines from .htaccess :

     AuthType Basic AuthName "My Protected Area" AuthUserFile /path/to/.htpasswd Require valid-user 

      Parse the .htpasswd file and make entries from it into the database table.

      There all user data is stored line by line in the form of login: password_hash. by default, the password is encrypted in md5.