How to Prevent PHP Code from SQL Injection | PHP Tutorial | Core PHP Method

preview_player
Показать описание
Here we are showing full practical code example to prevent Core PHP Code from SQL Injection.
What is SQL Injection?
It's a technique basically that attackers use to attack on our web application. They come on our web form and put statement with invalid character or SQL query.
When they will submit that information through text box, that will destroy our database and application.

In this video, we are teaching how to clean this things to avoid any kind of unfortunate things like SQL Injection.
We should use mysqli_real_escape_string() function that provided by PHP and pass the parameter that we want to clean and clear.

$username = mysqli_real_escape_string($connection, $username);
$password = mysqli_real_escape_string($connection,$password);

Click here:
Install Linux Step by Step method and Guide:

How to install and configure Web Server in Linux - Step by Step Method
Рекомендации по теме
welcome to shbcf.ru