Anti SQL Injection

To avoid SQL-Injection you could use this function :

function RES ($string) {return(mysqli_real_escape_string($_SESSION[‘$CONNECTION-DB’],$string));

}

Another solution is to use a cast, this only works for Integer values !

((int)substr($_GET[“VALUE”], 3))

 

4 thoughts on “Anti SQL Injection”

  1. I really like your blog.. very nice colors & theme. Did you design this website yourself or did you hire
    someone to do it for you? Plz reply as I’m looking to construct my own blog and would like to know
    where u got this from. appreciate it

  2. A motivating discussion is worth comment. I think that you should publish more about this subject, it may not be a taboo matter but generally people
    do not speak about such issues. To the next! All the best!!

  3. Wow, this piece of writing is good, my younger sister is analyzing such things, so I am going
    to let know her.

  4. Hi! I could have sworn I’ve been to this blog before but after reading through some
    of the post I realized it’s new to me. Anyhow, I’m definitely delighted I found it and I’ll be bookmarking and checking back frequently!

Leave a Reply

Your email address will not be published.

19 − five =