Ask coding questions

← Back to all posts
Login
mamamia5x (69)

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?

Commentshotnewtop
DJWang (1240)

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.

mamamia5x (69)

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

Vandesm14 (2423)

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).

mamamia5x (69)

@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.

Vandesm14 (2423)

@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.

Vandesm14 (2423)

@mamamia5x

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

mamamia5x (69)

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