Got a tricky one here, and I have no idea how to go about it.
I have a mysql db, lets say of music cd's (not really, but easy to explain). The data stored is Artist, Album, No of CD's, Genre.
I have a search html page (with php), where I can search on any data typr, and get the results. What I want to do is script in a button beside every result that is returned, whereupon when it is clicked, it copies the data into a formatted excel sheet. Preferably set so that nothing changes in the search results page - you click the button, the data is added to the excel sheet, but the search results page remains unchanged, allowing you to click on all the returned results without having to redo the search.
Like I say - the mysql db is running fine, and the search page is running fine. The results page lists all the results in a table.
I know what I want to be able to do, but have no idea how to go about it (I am on my 4th php/mysql book, and am still getting nowhere with this).
Cheers,
Pha3dr0n
Output to excel file ???
Moderator: General Moderators
have you tried opening a new browser window to run the php script to generate the file and download options? is that the sort of thing you are looking to do?
if you want to do it client side, you could use javascript which can now create files on the local machine and pull the information out of the html document, but this is very browser dependent and the user could have turned off javascript. etc. etc.
if you want to do it client side, you could use javascript which can now create files on the local machine and pull the information out of the html document, but this is very browser dependent and the user could have turned off javascript. etc. etc.