Jump to content

Preventing Mysql Injections


adam291086

Recommended Posts

Read what you write and at each logical point/query ask the question what could a user put in here that would return a false TRUE.

 

If you can't find any answers then you are good.

 

If you aren't sure post those portions of code and we'll aid you in answering the question

A) make sure magic_quotes_gpc() is off, if it's on, stripslashes()

B) make sure the variables in your sql statements are always in quotes

C) use mysqli_real_escape_string() or mysql_real_escape_string() on every variable in your sql statement

 

That's really all you need to worry about on the simplest level without getting into prepared statements, etc.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.