Skip to content

Tag: php

How do I force a link to download a document not preview it

I am generating a table of entries in a MySQL database using PHP. Each record references a document. I am putting a button link in the table to download the document for that record. The documents largely link to csv files. However, when clicking on them, it loads the csv file in the browser, but I want to fo…

Iterate through a php multi dimensional array with specific condition

I have a php array below and i want to know how to get number of companies who did a training course. Look below: Each array represents the record of a worker in the database from a company say Alucam and did training Electrical safety. So from the array above i want to get something like: 2 Alucams did elect…

Module view file showing invalid in Codeigniter 4

I’ve added the module folder in …appConfigAutoload.php My directory: Routes.php Blog.php After running my_domain/index.php/blog, it’s showing this error: Didn’t get any solution from this one: Codeigniter 4 View file invalid Where am I wrong? Answer Changing Blog.php to this, worked fo…