This PHP login script / tutorial will show you how you can have users register on your site, and log in to access secure areas. I have seen a few tutorials around the web which show how this can be done, but they all seem to lack in security. This user membership tutorial will show a better way of having users authenticated once logged in by using their session ID.


Categories: MySQL, PHP



That’s right! I have a simple MySQL class file that you can use in your PHP projects. I’ve been using it for years, and it’s never let me down! You can grab it on my Github: http://github.com/a1phanumeric/PHP-MySQL-Class.


Categories: Featured, MySQL, PHP



This is an update to a previous post of mine which uses the RAND() method. Using the following code, you can retrieve a random row much, much faster (MySQL 4.1.x/5.0.x), with thanks to Jan Kneschke: SELECT FROM AS r1 JOIN (SELECT ROUND( RAND( ) * ( SELECT MAX( id ) FROM ) ) AS id ) AS r2 WHERE r1.id >= r2.id ORDER BY r1.id ASC LIMIT 1; Replace: <COLUMN> [...]


Categories: Featured, MySQL



UPDATE: Please see my newer atricle on how to retrieve a random row, faster, without RAND(). This post assumes you know how to create and use a connection to a MySQL database in PHP and have a table named ‘quotes’ as shown below. In this post, I will aim to teach you how to use PHP to pull random quotes from a MYSQL table of quotes. This can be easily [...]


Categories: MySQL, PHP