How to return integers and floats from MySQL with PHP PDO
How to return numerics in JSON data from a PHP PDO MySQL query. Usually and as default all of the data is returned as strings. The following example SELECT code:…
PHP backend web language
How to return numerics in JSON data from a PHP PDO MySQL query. Usually and as default all of the data is returned as strings. The following example SELECT code:…
How to check if a file exists on a remote server or network from a URL with PHP. Using file_exists() only works for directory links (files on the system) and…
Generating an XML file with data from a MySQL database using the inbuilt SimpleXMLElement class. By using this class you can avoid formatting errors and issues than if you were…
How to POST JSON data or a file in PHP including receiving the POST request and saving it to a file. This is done with the easy to use PHP…
A simple method to validate a date or check the date is true to the Gregorian calendar in PHP by defining the month, day and year. PHP checkdate() will return…
How to load a SQL query from a file instead of having an inline query. This is done to help with formatting and easier understanding of the code. All that…
Effectively manage PHP MySQL inserts from a large loop using the PDO connection. The key is to avoid committing data on each loop, this is done using a transaction. Use…
How to enable the GD image library for PHP 8 with XAMPP on Windows. All that’s needed is a simple php.ini file edit. Enable GD PHP 8 XAMPP To enable…
Modern PHP PDO MySQL database backup script which includes a gzip compression option. Modified from this Stack Overflow post, the script is easy to use with configurable options for the…
A PHP isset, empty, and is null helper function comparison with a table for variables and common types. Quick rundown isset() returns true when the variable has a value, is…