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 array_merge() and array_merge_recursive() in php?
When use javascript vs php?
How to remove the new line character from the end of a text line in php?
What is php key?
How do I check if a given variable is empty?
How to list all values of submitted fields?
What is the use of trim function in php?
Why are sessions used?
Explain the syntax for ‘foreach’ loop with example.
How do you end a session in php?
What is difference between require_once(), require(), include()?
Is php a middleware?
Name some of the functions in php.
What is the purpose of pear in php?
How come the code works, but does not for two-dimensional array of mine?