I am trying to download an Excel using the phpExcel library only when it receives a $ _POST parameter.
Currently I have a file called my-information.php where I have a table and a button that executes this function:
In my my-file-generator.php file I have this code:
This way the file does not run, it does not download the Excel document. But if I copy the code that is inside the conditional and paste it in the my-information.php file, it executes perfectly when opening the page.
I tried adding the full conditional inside the my-information.php file and fetching the same file but it doesn’t work either and the console gives me this error. Apparently the problem is to do it using the $ _POST parameter:
I need to make the file generate and download only when I click the button, I have tried many ways and I can’t do it, could you please help me.
- Hiện tại chúng tôi có hơn 25 nghìn bài văn mẫu các thể loại.
- Kho tài liệu, đề thi học sinh giỏi các lớp vô cùng phong phú.
- Mỗi ngày cập nhật hơn 100 đề thi chất lượng từ các website bán tài liệu lớn.
Tải đề thi VIP với giá siêu rẻ tại Vip.Dethihsg247.Com