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
Can I learn laravel without php?
can we swap two different string using php for example:-- before swapping:-- 1 string :-hello friend, 2 string :-my dear, after swapping that strings will be: 1.hello dear, 2.my friend.
What is meant by public, private, protected, static and final scopes?
Explain the difference between $message and $$message?
What is difference between echo and print in php?
What are the 5 types of data?
What is == and === in php?
What is regex in html?
How do you count numbers in php?
Is php a cms?
What is input sanitization in php?
What is the difference between $name and $$name?
What is purpose of @ in Php?
How cookies are transported from browsers to servers?
Which cryptographic functions in php returns the longest hash value?