Password Hashing Overview In the world of web development and password storage, an ongoing debate lingers on, and probably will forever. The currently accepted “best practice” for hashing passwords is called Argon2 (wikipedia link to argon2). To give a brief overview of what it is, it takes any string (like...
PHP
This is an update to a previous post. In another post on this site, it was said that Dropbox Paper is the code storage of choice. This has changed. As of today, I much prefer using Microsoft’s GIT code repository known as: devops.azure.com. The benefits are numerous. Ability to revert...
Update here: Script Storage Update Throughout my career, my scripts have been a vital piece of my work. Where I store them has changed over the years. The challenge has been in finding a repository that is reliable, searchable, accessible from where I work, and that looks good with color-coding. Additionally,...
This short block of PHP code takes a SQL script and removes the “dash-dash” and “/**/” comments from it. Of course, many languages, including PHP itself, use the “/**/” comment style so this could apply to PHP scripts, as well. The line that removes the dash-dash style comments could easily...
Finding a quick PHP function for date difference was painful. Now that I found it, here’s the quick easy way. This site was a great help: http://www.phpf1.com/tutorial/php-date-difference.html
Finding a quick PHP function for date difference was painful. Now that I found it, here’s the quick easy way. This site was a great help: http://www.phpf1.com/tutorial/php-date-difference.html
This short block of PHP code takes a SQL script and removes the “dash-dash” and “/**/” comments from it. Of course, many languages, including PHP itself, use the “/**/” comment style so this could apply to PHP scripts, as well.
Ideally, when setting up a data-driven PHP site, you should have your configuration and database connection code separate from your code that generates content. What I want to display is a simple way to keep things separate and simple to work with. I use a config/index/data file structure. There are...
Occasionally, you discover something that you have been doing wrong for a long time. Sometimes it wasn’t something outright wrong but was just stupid. That is what happened to me. When using an HTML checkbox, it “POSTS” to the form submit page with the value of “on”. I have always...
Goal: Reduce long string to specified length for end-user preview. Reveal entire string when clicked. Go back to preview when clicked again. Check out the php and jQuery code: https://gitea.rnsworth.com/ben/PublicPosts/src/commit/b4f180878df7edc1b7ab71918d566736d619c87b/PHP%20and%20jQuery%20-%20Reduce%20Long%20String%20to%20Preview%20Length%20and%20Reveal%20Full%20Text%20OnClick.md YHTSZWNS7R6V