i am trying to create a members area for my site. i want it so when a user logs into the members area they are given some of there basic information about there account.
Would i be better setting up a table in my mysql database where they can log on and i would just echo there information onto the page.
To go into more detail im setting up a new webhost. In the members area i want there to be a little account information box which will display the domain or subdomain where there site can be found. there username, mysql username.
I was originally using .htaccess but i decided that i wanted something more user specific.
can any suggest what i should do and / or an easy way to do it.
Session or table
Moderator: General Moderators
Somethings to consider.....
The MySQL db you are talking about. Is it the same db that users would use for their accounts? What if the database goes down? Not only will users sites (those using mysql at least) start mis-behaving, but when they need to contact you to complain, they won't be able to login to the system.
Speed really isn't as a big an issue here if you are just providing a client with information regarding his/her account. That said, perhaps loging in against a file or file based db may be a better idea. It's a lot less likely to go away then a mysqld process is to crash!
And easier to back up too.
However, if you do decide to use MySQL, make sure you also have a second machine running MySQL and replicating from the first. That way, if your db goes away, you can fall back on the secondary box.
Later on and good luck,
Big Din K.R.
Speed really isn't as a big an issue here if you are just providing a client with information regarding his/her account. That said, perhaps loging in against a file or file based db may be a better idea. It's a lot less likely to go away then a mysqld process is to crash!
However, if you do decide to use MySQL, make sure you also have a second machine running MySQL and replicating from the first. That way, if your db goes away, you can fall back on the secondary box.
Later on and good luck,
Big Din K.R.
phpbuilder has an article and code for a user authentication system
http://www.phpbuilder.com/columns/tim20000505.php3
http://www.phpbuilder.com/columns/tim20000505.php3
Re: Somethings to consider.....
Dependent on how critical the availability of the application is.BDKR wrote:The MySQL db you are talking about. Is it the same db that users would use for their accounts? What if the database goes down? Not only will users sites (those using mysql at least) start mis-behaving, but when they need to contact you to complain, they won't be able to login to the system.
Speed really isn't as a big an issue here if you are just providing a client with information regarding his/her account. That said, perhaps loging in against a file or file based db may be a better idea. It's a lot less likely to go away then a mysqld process is to crash!And easier to back up too.
However, if you do decide to use MySQL, make sure you also have a second machine running MySQL and replicating from the first. That way, if your db goes away, you can fall back on the secondary box.
Later on and good luck,
Big Din K.R.
Maybe you should have a second webserver standing by incase the primary webserver goes down
In my opinion if you have MySQL available use it. How easy is it to perform searches and queries on "file based" compared to MySQL (and I am talking performance and coding).
I have 4 different webservers running all with MySQL databases and never had any problems with MySQL.