Page 1 of 1
Session or table
Posted: Sun Jun 09, 2002 2:38 am
by epic
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.
Posted: Sun Jun 09, 2002 6:22 am
by qads
the best way i can think of it is to use sessions, make a mysql table for users and have all the information about users in it then echo whatever you need.
Somethings to consider.....
Posted: Sun Jun 09, 2002 4:44 pm
by BDKR
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.
Posted: Sun Jun 09, 2002 6:02 pm
by rats
phpbuilder has an article and code for a user authentication system
http://www.phpbuilder.com/columns/tim20000505.php3
Re: Somethings to consider.....
Posted: Mon Jun 10, 2002 5:11 am
by mikeq
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.
Dependent on how critical the availability of the application is.
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.