I want a user of my website to enter some text in a text area and when he submits the form, the text that he entered be stored in a .txt file that is present in same directo
You can't. You need some server-side script to access the filesystem of the server such as PHP or Java.