Level Based Login

Hi all :)

i want to implement role base login system… Tried for many tutorials… I went through this also… but didn’t get solution. Tried this. but it gives me errors. Can any one help me please…