Ask coding questions

← Back to all posts
How To Log Input From A Website On Repl.it To A .txt (Text File)
DaFoxxxx

Q: How can I log info from a website to a text file:

I am making a website, I did it so it shows (coming soon) when you open the website

and I did is also show a segment where you could input your email to get notified when the site launches, but I want a way I could save the email they put in a text file to email them when the site is ready, for example,./Emails.txt

Bonus Q: And is there a way I could redirect them to a page saying:

Email address logged, you will be notified when the website is out?

Last Q: Can I use replit subdomain service for email addresses?

Example:
[email protected]

Voters
DaFoxxxx
Comments
hotnewtop
CosmicBear

It is not recommended to save website input to a text file as doing so is very un-reliable. If you want to log data, it is better to use Replit's built in database.

CosmicBear

Also, you need a backend server save data from websites. I would use Flask as it is easy to learn/use and can get data from an HTML form.

CosmicBear

And you can't use a replit subdomain for an email as you don't own the domain "repl.co".

DaFoxxxx

@CosmicBear how do i do the database thing

CosmicBear

@DaFoxxxx does your website currently have a backend server or is it an HTML repl.

DaFoxxxx

ok so, i didnt much understand, but you can check the repl in my profile its called rawr web and its css js and html [email protected]

CosmicBear
InvisibleOne

You would have to have a backend connected to the website, like node.js with express or django/flask with python.

XCode101

I do not think that you can use replit subdomain services for email addresses. As for your first question I think you have to use the 'fetch' function if you are using javascript.

DaFoxxxx

can you specify how and help me please?
@XCode101