Click here to Skip to main content
13,005,973 members (105,927 online)
Rate this:
 
Please Sign up or sign in to vote.
See more:
Hi guys... i was just wondering what will be the best approach to prevent SQL Injection? Some suggested to use addslashes and some suggested to use mysql_real_escape_string() now i just want to know what is the best function to use?
Posted 15-Feb-12 22:01pm
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

use stored procedures with parameters
  Permalink  
Comments
amitgajjar 16-Feb-12 5:29am
   
ofcourse 5+
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

  Permalink  
Comments
digimanus 16-Feb-12 4:20am
   
cool!
CPallini 17-Feb-12 5:48am
   
Thanks.
thatraja 16-Feb-12 22:19pm
   
5! :)
CPallini 17-Feb-12 5:48am
   
Thank you.
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

In security u can not relay on only 1 mechanism u should have more so if intruder break one u have second ready.

The following link will help u to develop some good security against SQL Injection.

Preventing SQL Injection with PHP[^]

SQL Injection Attacks and Some Tips on How to Prevent Them[^]

Best way to stop SQL Injection in PHP[^]
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 4

SQL Injection is a one kind of attack where the attacker generates malicious code and send into SQL query to access database or system.

For more please visit..
http://cybarlab.blogspot.com/2013/02/what-is-sql-injection.html
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 5

SQL Injection is a one kind of attack where the attacker generates malicious code and send into SQL query to access database or system.

For more please visit..

http://cybarlab.blogspot.com/2013/02/what-is-sql-injection.html
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.170628.1 | Last Updated 5 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100