hello guys. i want to add a button in php wich loads a document and includes it into the text area.
sample we have a file called document.txt
and if we load this file by pressing the button load, the textarea then is filled with the text that was in the file.
can this be possible?

Recommended Answers

All 4 Replies

If you wanted to load the txt file after the page has already been generated without refreshing you'll have to send an AJAX request to another PHP script which reads the text in the file and sends it back. The script that reads the file can be PHP but the rest would be JavaScript

okay. can you writte it for me please ?

but its not problem, if it can be inculded inside a form, and after i click submit than the text file should be included.

Sorry, but no one here is going to write your code for you. Find a good tutorial (like this one) and give it a go, if you experience troubles or have questions than feel free to ask and I'm sure someone here can help you out.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.