Skip to content
Advertisement

How to save file txt using html and php

i try to save textarea in html to file (“C:xampphtdocstest1one.txt”)

so i figure out i must use php too.

this php code, it work fine

JavaScript

so how can i use html textarea to edit php ‘edit me please‘ to any text i wanna to edit, plus that i wanna to enable multi line which save in one.txt if i need to.

my html code

JavaScript

Update #1 (try to add php inside html), but still not work no txt file data created.)

JavaScript

i’m still new, will be glade for your help :)..

Advertisement

Answer

You Need To know More About “Handle Form Using PHP”.

  • $_GET : collect form data.

html :

JavaScript

your_data.php :

JavaScript

to know more!

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