PHP

PHP data caching

PHP data caching

PHP
14.07.19
Sometimes it becomes necessary to limit the number of queries to an external data source. Especially if they do not change constantly. For example, the exchange rate in the central bank. Or simply speed up the page l...
Uploading files to the server

Uploading files to the server

PHP
29.05.19
Consider uploading files to a PHP server using the POST method. This will require a form with the file field type and an enctype attribute with a multipart/form-data value. HTML <form method="POST" enctype="multip...
Enumerating array elements without cycles

Enumerating array elements without cycles

29.04.19
The examples are very abstract, since the cycles exist. You must select all the elements of the array for a given attribute. There are several solutions. The most appropriate option in PHP is to use the built-in funct...
Joomla DB Queries

Joomla DB Queries

16.04.19
Consider two types of queries into the Joomla database by its own means. The code was written for CMS version 3.0 or higher. Perhaps in the versions below it will also work, but it was not checked. For clarity, the ex...
Sending form data to email

Sending form data to email

PHP
08.04.19
Let's write a simple form for sending data to email using the PHP mail() function. Our form will also write data to a file on the server. The code is not related to any CMS and can be used anywhere. Code: <?php ...