Claim your Biolink Click Here
0 like 0 dislike
263 views
Function for sql injection
in Education & Reference by (4.7k points) | 263 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

2 like 0 dislike
2 answers
0 like 0 dislike
1 answer
asked May 27, 2020 in Education & Reference by Marc (4.7k points) | 227 views
0 like 0 dislike
0 answers
asked Jun 13, 2018 in Education & Reference by Sam (1.6k points) | 338 views
1 like 0 dislike
1 answer
asked Jan 4, 2018 in Education & Reference by Sam (1.6k points) | 1.1k views
0 like 0 dislike
1 answer
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,312 questions
1,473 answers
569 comments
4,809 users