ztealmax Posted December 2, 2006 Share Posted December 2, 2006 Is there a simple way to make a user system with 3 types of accounts, for example:Main admin (Super administrator) = Can see all, edit allPrivilage (standard admin) = can edit some can view files (marked as standard admin, member)Standar (member) = can view files (marked as member))and some how store members in users.txt superuser in sadmin.txt and standard admin in admins.txtanybody know of any tutorials, or perhaps any ideas how i should do this?I dont want to use any kind of database such as (mySQL, SQL, etc...)//Martin Link to comment https://forums.phpfreaks.com/topic/29197-user-system/ Share on other sites More sharing options...
chiprivers Posted December 2, 2006 Share Posted December 2, 2006 I havn't done any work with storing details in a text file before so cant help you with the script, but is there any readon why you want to keep the user details in three seperate files? I would imagine it will be a lot easier to keep all the users details in one file and just specify their level of access. Link to comment https://forums.phpfreaks.com/topic/29197-user-system/#findComment-133869 Share on other sites More sharing options...
keeB Posted December 2, 2006 Share Posted December 2, 2006 ztealmax, you keep making me want to write a 'database' application out of text files. I am intrigued!!! :D It actually sounds like quite a challenging and fun project. My question is: Why would you not want to use a database when you do not have much knowledge in PHP yet, and file handling and parsing is a lot harder than just using a database?As for your question...I would make your text file like this:<userlevel>:<name>:<?password?>1:ztealmax // super user2:keeb // general admin3:billy3:bob3:joethen, explode the file on \n, then individuall explode on :, to get certain information.If you want a code example, just let me know. - keeb Link to comment https://forums.phpfreaks.com/topic/29197-user-system/#findComment-133873 Share on other sites More sharing options...
ztealmax Posted December 2, 2006 Author Share Posted December 2, 2006 [quote author=keeB link=topic=117080.msg477449#msg477449 date=1165039318]ztealmax, you keep making me want to write a 'database' application out of text files. I am intrigued!!! :D It actually sounds like quite a challenging and fun project. My question is: Why would you not want to use a database when you do not have much knowledge in PHP yet, and file handling and parsing is a lot harder than just using a database?As for your question...I would make your text file like this:<userlevel>:<name>:<?password?>1:ztealmax // super user2:keeb // general admin3:billy3:bob3:joethen, explode the file on \n, then individuall explode on :, to get certain information.If you want a code example, just let me know. - keeb[/quote]Well im thinking all hosts dont support sql etc ;) so why not use a simple textbased database :pcode examples ar always welcome ;)feel free to add me to MSN if you want :pill give you full access to my server heheAnother stupid idea i got is, why not make hmm a simple forum in this way:create forum tread titel it creates a folder with the forum name, and in it all the posts as text files ;)yeaa iknow im full with bad ideas hehe... Link to comment https://forums.phpfreaks.com/topic/29197-user-system/#findComment-133974 Share on other sites More sharing options...
ztealmax Posted December 3, 2006 Author Share Posted December 3, 2006 btw, i dont want a popup for login users ;)like a redirect to login if not autenticated Link to comment https://forums.phpfreaks.com/topic/29197-user-system/#findComment-134180 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.