I have a problem with the script for download of excel file.Initially I have a page query.html which has a form with action for another script called query.php.Here the user selects one value field from mysql database and one or multiple values from another field.These pass to query.php by post method.On submission the query.php produces a tabular output.Now I want the link to enable the download of the same output as an excel file thru the script downxls.php.However it shows error in the foreach loop.I am confused how to pass the same variables again to the scipt downxls.php as were passed to query.php.
difficult to tell anything! Like you was passing to query.php you can pass to download.php also. I cannot guess where are you doing mistake. It is sure that you are not doing error in excel haader etc. because you are doing error at foreach. Do one thing remove your header you may have put for excel and check the output, if it is correct in html format the same data can go for excel file if you put your header back. All Smiles!
2 Comments:
I have a problem with the script for download of excel file.Initially I have a page query.html which has a form with action for another script called query.php.Here the user selects one value field from mysql database and one or multiple values from another field.These pass to query.php by post method.On submission the query.php produces a tabular output.Now I want the link to enable the download of the same output as an excel file thru the script downxls.php.However it shows error in the foreach loop.I am confused how to pass the same variables again to the scipt downxls.php as were passed to query.php.
difficult to tell anything!
Like you was passing to query.php you can pass to download.php also. I cannot guess where are you doing mistake. It is sure that you are not doing error in excel haader etc. because you are doing error at foreach.
Do one thing remove your header you may have put for excel and check the output, if it is correct in html format the same data can go for excel file if you put your header back.
All Smiles!
Post a Comment