Javascript click button to copy textarea or input
How to do a button click to copy for a text box or input with HTML and a little bit of Javascript. The HTML (bootstrap): <div class=”container”> <div class=”row mt-2″>…
How to do a button click to copy for a text box or input with HTML and a little bit of Javascript. The HTML (bootstrap): <div class=”container”> <div class=”row mt-2″>…
Creating an HTML form that is dynamic based on what is selected. Certain form input elements will be shown based on the initial select dropdown. CodePen link. As you can…
The differences between constants and variables in PHP isn’t enormous but here they are: A constant cannot be changed once set and constants are global so unlike variables they can…
OPcache is said to improve PHP performance by storing scripts in shared memory thus avoiding the need to load scripts on each request. Whilst seemingly basic, its setup and enabling…
The basics for PHP MySQL PDO fetch types, whether it be returning just one row, one column or looping through a full table SELECT call. The common 3 fetch types:…
A PHP function to help reduce the load of duplicate code when producing HTML tables. This works by looping through an array for the thead (columns <–>) and then the…
Soundex is the algorithm for indexing names by sound or as pronounced. The MySQL SOUNDEX() function returns a Soundex string from a string supplied. It can also be used to…
How to Autofill or auto-complete an HTML input form using JQuery with PHP and MySQL. This method uses LIKE in a MySQL query for the typed in characters and returns…
Converting hours, minutes and seconds (H:i:s) string to just seconds with PHP can be done with an adaptable function that also works for just a minutes and seconds string. The…
How to generate a random time from an H:i:s formatted timestamp with PHP. For this example 02:38:55 will be used which represents 2 hours, 38 minutes and 55 seconds. The…