I’m trying to make a link that exports an SQL query as an excel spreadsheet. It’s part of a project where first, the user can enter multiple criteria into a search and get a table of all the results. The search form uses the $_GET function, and puts all the different things that the user searched for into the URL. From the new page where they can see the table of results, I’d like to be able to download that table, having the the code pull the variables from the current URL which includes all of their search criteria. I know it sounds kinda confusing, so I’ll put some example code to better illustrate what I’m talking about.
the url after the search has queried the SQL looks like: http://example.com/search.php?box1=billy&box2=george
the code from the example download page is:
[php]
[/php]
So yea, just to reiterate, my question is, Is there someway to pull variable information from the current URL? The only other option I see is having a second button on the Search form that would link to the download page and therefore receive the $_GET, but out of convenience, there must be a way to pull current URL data.
Please help, it would be greatly appreciated. Thank you.