Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
hi!

i want user can enter single cot(')in textbox.
i m using SQL yog but it display error as the insert query become
('dgfd dfg ddf_'','','',8) u can see here actually there are for paramerte but it shows error
Posted

well the solution you should take, and not just to solve you issue but make it more secure, is to use parameters[^] with the sql queries

 
Share this answer
 
Your application is wide open for SQL injection attacks.

Please instruct your users not to enter this in the text field:
','','',8);drop table Users;--

Alternatively, you can correct the code. Use parameterised queries instead of concatenating the data into the query.

 
Share this answer
 


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900