PHP Password Hash Function

password_hash() handles salting and algorithhm selection for you, its baked into PHP, just use it and don’t worry about how to hash and salt. BCRYPT output uses a fixed limited character set and is OK to use directly in SQL strings. If you need to force to fixed settings

Read More

Simple Site Log In Form

In the head of each page add this Note this must be before any html header are sent (i.e. in php code before html output) Use this as the log in page Use this as an optional log out page

Read More

Sanitising Strings

Sanitising for HTML Convert special HTML entities back to characters Sanitising for HTML from a form POST See page here. URL Encode and Decode Returns a string in which all non-alphanumeric characters except -_. have been replaced with a percent (%) sign followed by two hex digits and spaces encoded as plus (+) signs. A […]

Read More