Jump to content

mysql_real_escape_string


mbrown

Recommended Posts

no it is not the only thing

 

 

Google good injection prevention techniques as there are plenty of resources the key is you need to look at a few things

 

1) What is the garbage comming in?  What format what format should it be how can it come in wrong

2) Where is the garbage in getting stored (Update or Insert here)

3) When the garbage is commin out how is it being using (echo/print integer modification eval)

 

 

Hey there,

 

Hmm I would also suggest using htmlspecialchars(), personally I always use a function:

<?php
function db_protect($string) {
  return htmlspecialchars(mysql_real_escape_string($string));
}
?>

 

But you have to think about where will the data be sent from, what format will it come in and what will it be used for.

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.