Hello gurus, Am having a page on my site where each members can view their transactions. i echoed the transaction out in a table. i want to create a button whereby on clicking this button the page/table will be exported in microsoft excell format or pdf format, is this possible?
try this for PDF: http://php.net/manual/en/ref.pdf.php and this'll probably help with excel: http://pear.php.net/package/Spreadsheet_Excel_Writer
You can use this one. I had exported username and password $result = mysql_query($query) or die("Error: ". mysql_error(). " with query ". $query); while($myrow = mysql_fetch_array($result)) { $XML.= $myrow['username']. ","; $XML.= $myrow['password']. ",\n"; } echo $XML;
well that's not exactly an excel file but that can be used to make a .csv file which can be opened with excel. however you'll need to write the $XML variable to a .csv file instead of printing it out.