Jump to content

user system?


ztealmax

Recommended Posts

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 all
Privilage (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.txt

anybody 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

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

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 user
2:keeb // general admin
3:billy
3:bob
3:joe

then, 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

[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 user
2:keeb // general admin
3:billy
3:bob
3:joe

then, 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 :p

code examples ar always welcome ;)

feel free to add me to MSN if you want :p
ill give you full access to my server hehe

Another 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

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.