im planning to do a library management project on PHP.Please provide me some good practices on coding, database as this is my first big project and im a newbie.
im planning to do two websites for libmgmnt, one admin website hosted on librarians system and all other system loaded with member website.is it a bad idea?? or should i combine into one site and provide both admin login and member login in the homepage.
should i store username and password only in a seperate table (say login table with two fields username and pwd) or complete details of registration including username and pwd in one table??please suggest me the good method.
Well thats mainly up to yourself. Some people like it seperate (especially in large organisations) and some don't.
Peronally I don't like get it too seperate. That just means extra work while (in not so big organisations) it's not that important. As for the login table, yes I would suggest keeping the login and his profile appart. Login credentials are different than profile information.
But everyone has a different view of this subject though.
__________________ Nunchaku! Who doesn't like martial arts? =)
I didn't put too much time into my list so it's basic.
Basically, you get your user table and then a secondary roles table. A user can only have a single role but presumably a user with a higher level can do more things, with Admin's being the highest.
Or you could have a little table containing Admin usernames/emails and whenever someone goes to the Admin login page, it'll cross check that table. It depends on the number of differing role levels. You might want only visitors who can't do anything but view unless they login, members can favorite things, maybe, moderators could help fix book labeling problems but not add new books and finally admins could do everything.