What and How possible injection in PHP and mysql?

Answers were Sorted based on User's Feedback



What and How possible injection in PHP and mysql?..

Answer / ram

sql injection can be given along with user supplied data.
Examples of sql injection:

' or 1=1 --
' OR '1'='1. these sort of input could break into the code
by tricking the sql query.

Is This Answer Correct ?    9 Yes 1 No

What and How possible injection in PHP and mysql?..

Answer / tarun

first of all tell me what is injection here...........

Is This Answer Correct ?    1 Yes 0 No

What and How possible injection in PHP and mysql?..

Answer / 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

More PHP Interview Questions

What are the encryption functions available in PHP?

0 Answers  


What is get method in java?

0 Answers  


Why is used in php?

0 Answers  


Explain how to execute a php script using command line.

0 Answers  


What’s the difference between htmlentities() and htmlspecialchars()?

0 Answers  


Which php mvc framework is best?

0 Answers  


What is session and Cokkies . How it works . tell some thing about Session_id()

1 Answers   DVS, Net Solution, PVWEBCO,


Please explain is it possible to use com component in php?

0 Answers  


What is mod_php?

0 Answers  


How do you remove whitespace from the beginning and end of a $string variable?

0 Answers  


How to invoke a user function?

0 Answers  


Whhat is a Functions

1 Answers   IQ,


Categories