What is SQL Injection and how to make your PHP site free from SQL Injection hacking

1 · Subin Siby · March 27, 2013, 1:32 p.m.
SQL Injection (SQLi) is a very dangerous thing that a hacker can do to your site. This happens mostly in SQL queries. Let me make you understand this in a simple way. Suppose you’re SQL query code is this: $user=$_GET[‘user’]; $sql=mysql_query("SELECT * FROM users WHERE user='".$user."‘"); It’s a normal code. BUT it is a very easy method for hacker to easily destroy your database. The user ID is getting from a GET request....