Skip to content
Advertisement

How can I save TXT Files from a HTML textarea, using PHP?

I am trying to make a text file storage system for my website.

Here is what I have so far.

I have gotten some parts to work, but am getting many more errors after making a few changes I thought would help.

I am trying to accomplish this task without changing pages or url.

JavaScript

If the only way is to have it redirect to a php page, then send it back, that is fine, but I have no clue how to do that, (even though its probably A LOT simpler)

Thanks for any help or advice you can provide me!

-Jake

Advertisement

Answer

First of all, thanks sooo much for the help!

I really appreciate it when those people who are more experienced can help out a newbie once in a while.

After spending some time tinkering with my code with some of the suggestions from you, I have finally gotten it to work! 😀

I’ll leave the final code here in case anyone else stumbles upon this topic with a similar issue.


JavaScript

Hope this helps!

-Jake

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement