Make a button that runs a php script. Have the php run the same query as the webpage but instead of echoing the results to the screen save them to a textfile on the server. Pull up a new page with a link to the newly created text file. They can then right-click the link and "Save target as" to download the textfile to their harddrive or they can click it and the browser will display the contents of the file (they could then either cut and paste or save).