What and How possible injection in PHP and mysql?
Answers were Sorted based on User's Feedback
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 |
Answer / tarun
first of all tell me what is injection here...........
| Is This Answer Correct ? | 1 Yes | 0 No |
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 |
If the variable $var1 is set to 10 and the $var2 is set to the character var1, what's the value of $$var2?
Will a comparison of an integer 12 and a string "13" work in php?
I have written a source code in php but I do not know how to compile that and conduct it with a website please explain me the how to compile that ?
How do you pass a variable by value?
Use of Session
How to implement a class named dragonball. This class must have an attribute named ballcount (which starts from 0) and a method ifoundaball. When ifoundaball is called, ballcount is increased by one. If the value of ballcount is equal to seven, then the message you can ask your wish is printed, and ballcount is reset to 0. How would you implement this class?
How to include a file code in different files in php?
Which function would you use to read a line of data from a file in php?
How can we know the count/number of elements of an array?
How is it possible to know the number of rows returned in result set?
Explain me soundex() and metaphone()?
What is better .net or php?