Programming
Handle Sessions in PHP
Keep a user logged in across page loads with PHP's built-in session functions. session_start() opens the session, the $_SESSION array holds the data, and…
Programming
Keep a user logged in across page loads with PHP's built-in session functions. session_start() opens the session, the $_SESSION array holds the data, and…
Programming
Hash and verify passwords in PHP with password_hash() and password_verify(). Store a secure bcrypt hash, check logins against it, and upgrade old hashes automatically…
Server Administration
Enable mod_rewrite in Apache to turn ugly query strings into clean URLs. Load the module, allow .htaccess overrides, then add one RewriteRule so a…
Programming
Get the last inserted ID with PHP PDO by calling lastInsertId() right after an INSERT. This tutorial captures the AUTO_INCREMENT id of a new…
Programming
Resize an image in PHP with the GD extension. Load the source, create a smaller canvas, and copy the pixels across with imagecopyresampled() to…
Programming
A PDO transaction groups several database writes into one all-or-nothing unit. This tutorial builds the classic bank-transfer example: the debit and credit either both…