Skip to content
← Back to Community
I built an account system with PHP
Profile icon
tamkerl

I built an account system with PHP a while back.
Here are some features that you can do on the website:

  • Sign up / Log in
  • Create comments (if logged in), and delete them
  • Have an avatar
  • Change your profile description
  • Change your username
  • Change your password
  • Report other users comments
  • Report other users
  • Delete your account
  • Suspend your account (this will prevent your account from being accessible)

I would really appreciate feedback about it!

https://software.tamkerl.repl.co

Voters
Profile icon
AARUSHKANDURI1
Profile icon
hachimagic
Profile icon
aricmiller
Profile icon
IpYT
Profile icon
ROCKINGRAYQUAZA
Profile icon
frostedbutton75
Profile icon
VulcanWM
Profile icon
tamkerl
Comments
hotnewtop
Profile icon
ROCKINGRAYQUAZA

And I think this is vulcan came to know about you!!An upvote from me too ^_^

Profile icon
hachimagic

I love it

Profile icon
aricmiller

Nice work! This looks like a professional website.

Profile icon
tamkerl

@aricmiller Thank you!

Profile icon
aricmiller

@tamkerl No problem. :)

Profile icon
ROCKINGRAYQUAZA

Awesome bro!! I will also learn php someday

Profile icon
frostedbutton75

Wow! I agree with @VulcanWM !

Profile icon
tamkerl
Profile icon
frostedbutton75

Np! I didn’t know people code do this with PHP, so this is inspiring! @tamkerl

Profile icon
VulcanWM

Amazing man! You are an excellent coder!

Profile icon
tamkerl

@VulcanWM Thank you so much!!

Profile icon
VulcanWM

Your welcome. Hey I need a website like this, but I don't know how to make one. Can you make one for me? @tamkerl

Profile icon
tamkerl

@VulcanWM Do you mean regarding the backend or layout?

Profile icon
VulcanWM

Regarding the backend @tamkerl

Profile icon
tamkerl

@VulcanWM It's not really that hard to make.
I started with just allowing people to make comments, then later allowed them to create accounts, which are encrypted.

This is how my account system works:

I have a user file, containing info about all users.
The user file contains a JSON object, like this:
[
{},
{}
]

That is an array, with two objects inside of it.
The first array item in the top-level array contains properties with titles such as "19571" (note that this ID shall be random and not already existing in the database when creating the account), which is an ID for a user.

Example:

[
{
"19571":[]
},

{}
]

Above you can see that the "19571" property is an array.
The first array item contains another array with encryption details for the private user object (when logging in, the system will try to decrypt that message, and if successful, logging in).

The second array item in the "19571" array is a "public object", which I use for public stuff such as your profile description, or the date that your account was created.

Now, with the first array item of the top-level array explained...

The second array item in the top-level array contains pointers to your ID by usernames, for example:

[
{
"19571":[...]
},

{
"joe_1986":"19571"
}
]

Where "joe_1986" is a username.
Upon user creation, both the UID ("19571") array (with its contents) and the username pointer ("joe_1986") should be created.

Giving the user a UID instead of just using the username for the private and public object lets you, for example, change your username easily, because in that case you would use the UID in e.g. comment files, to then point to the user, which makes the username editing really easy, without having username left in the system.

I hope that I explained the architecture as simple as possible, and good luck with your projects!

Here are some links to help you build a backend system like this:

Please note, that to build an account-system like this, you must learn PHP for a while, and know things such as:

  • Variables
  • Objects
  • Encryption
  • Server response
  • HTML
Profile icon
VulcanWM

ok. I don't feel like learning a new language, can you make something like this for me? I'll credit you @tamkerl

Profile icon
tamkerl

@VulcanWM Oh, I'm quite busy, but cannot you copy those parts to your project?

Profile icon
tamkerl

@VulcanWM I didn't build the account system to be adaptable for other websites, but if you use the same code as me and then adjust the CSS etc. I may be able to help you with that later if you want.

Profile icon
VulcanWM

ok then @tamkerl

Profile icon
Celled