A
AG
Guest
Hello there,
I am a Technology student.
I have a website and i use mysql database for storing the data of the website (feedback forms etc.).
Now, the thing i want to do is that i wish to write the data of the database to a file (text/excel) on the click of some button and i want that file to be created at the moment i click the button so that the file gets downloaded and save to my machine automatically.
I know about the fopen function and i tried it too and i got it working too but the result is that the file is getting created and saved in the directory in which the original php file is saved but i wish to get that file downloaded after the page reload.
So please help me out with this.
Any help will be appreciated.
I am a Technology student.
I have a website and i use mysql database for storing the data of the website (feedback forms etc.).
Now, the thing i want to do is that i wish to write the data of the database to a file (text/excel) on the click of some button and i want that file to be created at the moment i click the button so that the file gets downloaded and save to my machine automatically.
I know about the fopen function and i tried it too and i got it working too but the result is that the file is getting created and saved in the directory in which the original php file is saved but i wish to get that file downloaded after the page reload.
So please help me out with this.
Any help will be appreciated.