What and How possible injection in PHP and mysql?
Answer Posted / dinesh g
What is Injection?
When a user is inserting any value into the text box, we
store that in a variable and place it in a query. If the
user also types any query within the text box our mysql will
run the query.
ex :
INSERT INTO students (name) VALUES ('Dinesh'); DROP TABLE
Students;
Here the user types his name as Dinesh also he write the
next query to drop the table. so this table is dropped if it
is present.
TO avoid it we use addslashes() else
mysql_real_escape_string() methods to escape from the users
query.
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is the difference between javascript and php?
Tell me how is it possible to propagate a session id?
Write a program to find the factorial of a number in php?
How to convert a character to an ascii value?
How to create a session? How to remove data from a session?
What are sql functions?
Tell me what is the use of isset() in php?
What is the difference between rest and soap?
What is str_replace()?
How to take a substring from a given string in php?
what the new feature add in php 7.2?
Is php better than java?
Tell me how to retrieve a cookie value?
Explain how does one prevent the following warning ‘warning: cannot modify header information – headers already sent' and why does it occur in the first place?
What is the current php version?