Prevent multiple login of same account with PHP

Sometimes required to restrict the user to only log in on a single system or a browser at a time.

To prevent the user from login on multiple systems or web browsers you need to generate a token on each successful login attempt.

Need to check the token on each page. If the token does not match then destroy the SESSION and log out the user.

In this tutorial, I show how you can prevent multiple logins of the same user with PHP.

Prevent multiple login of same account with PHP

Read more

How to embed jQuery into HTML page

jQuery is a popular JavaScript library that makes easier to include dynamic and interactive content on the website. It offers a wide range of tools for navigating, modifying, and animating HTML documents as well as for managing events, executing AJAX requests, and building plugins.

With this, you can perform the same task written in JavaScript with just a few lines of code.

Compatible with most browsers and supports CSS3 selectors to find and style property manipulation.

How to embed jQuery into HTML page

Read more

Connect to multiple MySQL databases with PHP

Within the project sometimes requires using multiple MySQL databases. It may be the existing database from another project or the new one.

To handle this with PHP requires to create separate connections for each database and use the connection accordingly while manipulating data in MySQL database.

Connect to multiple MySQL databases with PHP

Read more