Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is the difference between array_merge() and array_merge_recursive() in php?

1071


When use javascript vs php?

1008


How to remove the new line character from the end of a text line in php?

967


What is php key?

945


How do I check if a given variable is empty?

930


How to list all values of submitted fields?

930


What is the use of trim function in php?

957


Why are sessions used?

945


Explain the syntax for ‘foreach’ loop with example.

951


How do you end a session in php?

1075


What is difference between require_once(), require(), include()?

995


Is php a middleware?

952


Name some of the functions in php.

994


What is the purpose of pear in php?

1013


How come the code works, but does not for two-dimensional array of mine?

976