Skip to content
Sign upLog in
← Back to Community

Login

Profile icon
mamamia5x

I am making a simple PHP Chatroom, but I've never used PHP before. I just want to know how do you make a login that'll actually save and be able to be read?

Voters
Profile icon
CristianRusso1
Profile icon
ThrobackGames
Profile icon
DJWang
Profile icon
mamamia5x
Comments
hotnewtop
Profile icon
DJWang

Hey

@mamamia5x
! I've noticed your problem here. Yes, there is a way to store them in a txt file but you can only use that in python.

Profile icon
mamamia5x

@DJWang
Nice, is there some way to do that in the php?

Profile icon
Vandesm14

PHP databases like SQL do not work on repl.it. You're going to have to use remotesql or some other remote database service instead (some are free, most are paid).

Profile icon
mamamia5x

@Vandesm14
Isn't there some kinda way to store it inside of a text file. I've figured that out, but I've made my own encryption, but I can't seem to figure out how to write the javascript variables in the text files.

Profile icon
Vandesm14

@mamamia5x
You can store text to files, yes, but repl.it will reset them at least once per day, preventing any type of file-based database from working on repl.it
Despite this, I'll still tell you how to write the js files in text files: Just send them via ajax post request to a PHP file which writes them to the database.

Profile icon
mamamia5x

@Vandesm14
Ok thanks.

Profile icon
Vandesm14

@mamamia5x

Please mark my comment as the answer if I resolved your issue 👍

Profile icon
mamamia5x

@Vandesm14
I'm going to mark it if I make the login system. Thanks.

Profile icon
JimmieLarson

@Vandesm14
Thanks

Profile icon
BethanyImlay

@Vandesm14
I want to know why PHP databases like -SQL do not work. And that is why I am searching for the answer online and I am glad I found your post where I found my answer. I also found https://www.topessaywriting.org/samples/movies website where I can read essay samples for free.