Display number of rows before exporting
I have a php page the exports the results of a Dataassit search to a CSV file. This page is a modified results page for a Dataassist search_results page. Rather than have the search results immediately go to the CSV file download, I would like to show the user the number of records their search results contain so that they can decide whether or not they actually want to download a file with that number of records.
I have an intervening page that echos the $totalRows_WADArecordset variable, and asks the user to confirm the download or go back to a new search. I am unsure of the best way to proceed if the user confirms the download though.
1. Are the search results represented by some variable I can reference in some way and pass to the results page that echos results as a CSV file; or
2. Is there a way to pass the search query to the CSV results page (it's basically a Dataassist results page).
I'm not sure how to go about either and am hoping their is a way to do this without having to repeat the database query when the user confirms a download.