Ask coding questions

← Back to all posts
Can someone help me?
h
JordanDixon1 (352)

I have been trying for months on my own to try to make my own social media website. I can't seem to get past trying to make a login/register system with php, html, javascript, or anything else. I have been trying to do this with jsonstorage.io but it's too complicated for me. If anyone can help me then that would be greatly appreciated.

Answered by PDanielY (1091) [earned 5 cycles]
View Answer
Commentshotnewtop
mwilki7 (1104)

My temporary solution would be just a plain text file somewhere.
Take the username and password and put it in a comma separated format.

user1,password1
user2,password2

When a user attempts to login:
    if username exists, compare the password
         if password matches the one in the text file
              login successful
         else
              login failed
    else
        username does not exist, login failed

However secure/insecure this is, it would be just a functioning prototype that you can come back to later while you work on the other parts of the site.

Deacon_Cronin (67)

@mwilki7 Yeah definitely do not do this. It does work, but SQL injections would be scarily easy and the database being stored in plaintext is very insecure.

mwilki7 (1104)

@Deacon_Cronin
I already stated that this is a temporary solution. The intent of my answer was to give OP a functional prototype so the rest of the program can be fleshed out.

JordanDixon1 (352)

@mwilki7 thanks. I have already thought of this however and due to security reasons have marked it off my list. ._.

Zavexeon (1030)

@JordanDixon1 This'd be better if you store the password as a hash.