There is a project i am working on its a social networking between chilldren teacher and parents .I want to restrict typ of user to these three only.Do u guys have any idea how to initiate.
ehm ... best way to start: write the analysis. have it validated, make sure it makes sense not just to you, but also to those who'll use it.
check whether they have additional wishes, if so, see if you can add them.
check your analysis, and gather the necessary material from it:
what classes 'll you need? which methods? what functionality?
also: important to know: what framework(s) will you be allowed to use? it's no use writing the greatest webapp in the world, all in jsp&servlets, just then to find out all you get is a server that doesn't support jsp.
check what deadline you have, see if you can get it done.
as for the type of users: you can use an enum, with three values: CHILD, PARENT, TEACHER.
while registering, each person must be linked to a role (one of those three values) which is linked to one of those enum values. That should help you out.
If you meant: "I need to verify that someone who registers as a parent actually IS a parent of somebody on the school" .... now there's a dodgy one. not only will it be technically more difficult, it 'll be an intrusion on their privacy, and thus, illegal.
What you can do, is have someone (perhaps at the administration of your school) serve as a moderator, who has to approve registrations before they actually can log in.
Yes finding the role then redirecting the user to certain page is right,but managing db is a problem .Anyways thanx for help and ur time.
managing the db shouldn't be that much of a problem. remember: you're not writing an app that 'll have hundreds of thousands of simultaneous users.