Jump to content

Storing User Information in FILES mainly instead of MySQL


DanielWhite

Recommended Posts

Am I right to say the the 'bin' folder is private?

 

I am looking for a way to make mysql connection A LOT lighter. So I was wondering, if the following would work and be secure:

 

User fills in login form.

Form gets submitted.

PHP connects to MySQL database.

If all is good, a cookie with the username and password (MD4/MD5/SHA-1) in is created.

A file is created in the 'bin' folder with user details inside from the MySQL db called $username$password.php

 

Then on my pages I can use the cookie to import the exact user file and therefore load up there user information if needed.

 

Any problems with this idea?

 

 

Thank you,

Daniel White

 

 

 

Well wouldn't they get deleted when the session ends?

 

you don't need to store passwords in the cookie you need the basic relevant user data that will be carried from page A->B for the user in your session/user i.e (userid, username)

 

as for being deleted yes it gets deleted periodically after their "session" dies, but that isn't a big deal in my opinion.  storing a concurrent file for each user would be ever worse then recreating files

Any problems with this idea?

 

No real problems with it, seems quite pointless however.

 

Not pointless. My host just does not allow very many MySQL connections and when the limit is reached (A lot of the time)  I get a horrible ERROR page. So by doing this that error page shouldn't come up.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.