Tips & Tutorials – PHP

How To Implement CSRF Token in PHP – Really Simple Example

tWelcome to a quick tutorial on how to implement CSRF token protection in PHP. Working to further secure your website, or just stumbled on this “CSRF token” thing on the Internet? Well, it stands for “Cross-Site Request Forgery”, and this token thing is nothing more than a random string in the session. The simplified steps …

How To Implement CSRF Token in PHP – Really Simple Example Read More »

PHP URLencode VS RAWURLencode – What Is The Difference!?

Welcome to a quick tutorial on the difference between urlencode and rawurlencode in PHP. So what are these used for, and why are there two different versions of “encode URL”? Which one is correct and which should we use? A URL string cannot contain white spaces and characters such as @+%. For example, http://site.com/my path/?email=jon@doe.com …

PHP URLencode VS RAWURLencode – What Is The Difference!? Read More »

How To Upload Download Files Through FTP In PHP – Simple Examples

Welcome to a quick tutorial on how to upload and download files through FTP using PHP. Need to manage some files on a server through an automated script? To upload and download files using PHP FTP, we just need to enable the FTP extension in php.ini and use it accordingly: $ftp = ftp_connect(“HOST”); ftp_login($ftp, “USER”, …

How To Upload Download Files Through FTP In PHP – Simple Examples Read More »

Country State City Dependent Dropdown With PHP MySQL – Simple Example

Welcome to a tutorial on how to create an AJAX-driven country, state, city dependent dropdown list with PHP and MySQL. So you are working on a top-secret ninja project that will cascade load once the user chooses the country, state, or city? Well, it is actually not that difficult. To create a country, state, city …

Country State City Dependent Dropdown With PHP MySQL – Simple Example Read More »

3 Steps Simple PHP MySQL CRUD Application (For Beginners)

Welcome to a tutorial and example on how to create a simple CRUD application with PHP and MySQL. So you may have stumbled on this “CRUD thing” somewhere, and wonder if it is some sort of a standard framework to develop applications. Well, not quite. CRUD refers to the basic computer operations of: Create – …

3 Steps Simple PHP MySQL CRUD Application (For Beginners) Read More »