Jump to content

how to handle database users


voodoochicken

Recommended Posts

Hi, a little background:This is my first php ever and i have only used sql previously for academic reasons but never in real life apps and have never done a web app before. I want to do an app that can handle lots of clients and manage sessions, for example a user logs in and in the screen appears his or her info, and some options according whether he or she has granted some privileges. i don't know what is best, should the database create a login for each user or should i login all users with the same login and password (in the login page the user is already logged and a session is already created, but won't be able to do anything till the user and password he/she inputs are present in some table record, retrieved like a normal query).The things i got in favor of a database login for each user are a higher level of privileges management, but i don't know how to retrieve the info for that user (how do you say, if you login like this user, retrieve this info). The second option would be like there was a single user in the whole system, but according to the user and pass he-she inputs, there would be some things he-she can or can not do, and it would be the php script the one that handles that. I don't know either if there is a limit in the number of logins you can create in a web hosting service (so far i have not found anywhere that says there is a limit). Do you have any comments and is there any php-mysql example about logins and session management?Tnx

Link to comment
Share on other sites

Database users are accounts with permission to log in to and use the database itself, those are not your website users. The entire website application will use a single database account to access the database. If you want website users it is up to you to create the tables to store those users and their permissions.

Link to comment
Share on other sites

This is my first php ever and i have only used sql previously for academic reasons but never in real life apps and have never done a web app before. I want to do an app that can handle lots of clients and manage sessions, for example a user logs in and in the screen appears his or her info, and some options according whether he or she has granted some privileges[ ...]
Your starting-point is mysql/php. But by real life as opposed to academic, do you mean commercial? If so (or perhaps anyway), you should consider the MS world too, because the things you are asking for are already built in to ASP.NET in the membership provider classes and forms authentication: http://msdn2.microsoft.com/en-us/library/y...fzy(VS.80).aspx
Link to comment
Share on other sites

Archived

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

×
×
  • Create New...