Tag Archives: php

PHP Argon2 Password Hashing

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 your password) and converts it… Read More »

PHP Date Difference

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

PHP Date Difference

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

Basic PHP Data Setup

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 ways to further break apart… Read More »

HTML Checkboxes

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 converted that on the page… Read More »

PHP and jQuery – Reduce Long String to Preview Length and Reveal Full Text OnClick

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

PHP explode and trim the results?

php.net – where I posted this Overview This is something that I used to use on this site before I went to WordPress. If you checked “view source” and looked at the meta keywords, you would notice a comma separated string. When programming, you may want to take a comma separated string and grab the… Read More »