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:…
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…
Building an array in Javascript and filling a text area with the array and clearing it on button click. CodePen example. To build an array in Javascript you need to…
Using jQuery to select text and input values based on closest parameters. CodePen example. closest() will get the first element matching by traversing up, whilst find() will descend until the…
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 do an UPDATE from an INSERT with SQLite when there is a duplicate key value. With SQLite you cannot do the simple MySQL INSERT on duplicate key UPDATE:…
Apache alias is the method to use the filesystem other than under the document root. Setting an alias directory with Apache means that when going to the specified URL path…
A simple method and guide to attaching BuyVM storage disk slabs to your VPS. This post uses a 3TB disk slab and VPS running Ubuntu 20.04. Firstly make sure your…
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…