0 like 0 dislike
57 views
Function for sql injection
in Education & Reference by (2.4k points) | 57 views

1 Answer

0 like 0 dislike
//Function for sql injection
function sqlInjection($data){
$data = stripslashes($data);
$date = mysqli_real_escape_string($data);
return $data;	
}

USAGE

// To protect MySQL injection
$email = sqlInjection($email);
$password = sqlInjection($password);
$sql="SELECT * FROM users WHERE email='$email' and password='$password'";
$result=mysqli_query($con,$sql);
by

Related questions

0 like 0 dislike
0 answers
asked Jun 13, 2018 in Education & Reference by Sam (1.3k points) | 55 views
1 like 0 dislike
1 answer
asked Jan 4, 2018 in Education & Reference by Sam (1.3k points) | 274 views
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
asked Jun 26, 2019 in Education & Reference by Simmi (530 points) | 15 views
0 like 0 dislike
1 answer
asked May 29, 2019 in Education & Reference by Marc (2.4k points) | 39 views
0 like 0 dislike
1 answer

Where your donation goes
Technology: We will utilize your donation for development, server maintenance and bandwidth management, etc for our site.

Employee and Projects: We have only 15 employees. They are involved in a wide sort of project works. Your valuable donation will definitely boost their work efficiency.

How can I earn points?
Awarded a Best Answer 10 points
Answer questions 10 points
Asking Question -20 points

1,197 questions
1,343 answers
314 comments
1,778 users