I have a table of my blog called news, in this news table I have the fields, id, title, text, author, date
I would like to create a button where by clicking it it creates a .txt file with all the information coming from my ex database:
id: 1
titulo: titulo da noticia 1
texto: texto da noticia 1
autor: autor do post 1
data: data do post 1
id: 2
titulo: titulo da noticia 2
texto: texto da noticia 2
autor: autor do post 2
data: data do post 2
id: 3
titulo: titulo da noticia 3
texto: texto da noticia 3
autor: autor do post 3
data: data do post 3
and so on .. getting all DB data how can I do this?