1
i have a table of my blog called noticas, in this table news I have the fields, id, title, text, author, date
would like to create a button where clicking on it creates a file . txt with all the information coming from my database ex:
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 and so on.. taking all the DB data how can I be doing this ?
Opens the file with the
fopen()
, goes through the records writing in the archive, withfwrite()
, and in the end closes it withfclose()
. Have you tried anything?– Woss