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 javascript and php?

969


Tell me how is it possible to propagate a session id?

981


Write a program to find the factorial of a number in php?

945


How to convert a character to an ascii value?

1021


How to create a session? How to remove data from a session?

938


What are sql functions?

898


Tell me what is the use of isset() in php?

998


What is the difference between rest and soap?

1047


What is str_replace()?

960


How to take a substring from a given string in php?

866


what the new feature add in php 7.2?

911


Is php better than java?

926


Tell me how to retrieve a cookie value?

953


Explain how does one prevent the following warning ‘warning: cannot modify header information – headers already sent' and why does it occur in the first place?

939


What is the current php version?

1027