The first creates a normal unique ID while the second shows how to make a longer ID. Cryptographically Secure Pseudo … Building this feature is relatively straightforward. And now - information about how to use some settings. Generate a Unique ID If you simply want to generate a unique string and it does not have to be cryptographically secure, then consider using the uniqid () function. Generating useful random data is a fairly common task for a developer to implement, but also one that developers rarely get right. Since I’ve been out of the PHP game for a while, I was researching how to create such tokens without additional libraries. For passwords, you can give users the option t… A session is started with the session_start() function. Now that you've understood how to open a connection to the MySQL database server. You can generate that quite easily as well, var token = Guid.NewGuid().ToString(); An affiliate referral link/URL is the URL affiliates use to promote your website or products. Create a file with a unique name with PHP The PHP function tempnam() creates a file with a unique name. The correct approach is to use the unique ID on its own; it's already geared for non-collision. Create a Registration Page First, follow the instruction on How to Create Registration Page in PHP/MySQL. Downloading canvas as Image (DataURL) on button click, Error validating verification code. Learn PHP - A Beginner's Guide to PHP Programing, PHP Script to Upload an Image and Write to MySQL. Create Database: Create a database using XAMPP, the database is named “loginpage” here.