How can I make a php/mysql INSERT to insert a new username and password for a htaccess file. I have a pay a site for instance that I want to force upon payment and ipn back that it inserts a username and a password for someone. How can I make this possible via htaccess Or would I have to just create the user database and have it check user database for login and have it insert that instead? then in the directory just have it echo to check login first before showing data? Please any help would be great. Thanks, TJ
You could use system() to directly call htpasswd, but I think a PHP database is a better solution to what you need, because it would enable you to easily track users and various statistics (e.g., how often a given user is logging in).