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

 

 

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.