piece of php code for prevent hacking.
Posted
by artmania
on Stack Overflow
See other posts from Stack Overflow
or by artmania
Published on 2010-04-16T08:32:06Z
Indexed on
2010/04/16
8:43 UTC
Read the original article
Hit count: 326
Hi friends,
I have a php file at my site, and I connect to db, get some records and list them in same file.
mysql_connect("localhost", "blabla", "blabla") or die(mysql_error());
mysql_select_db("blabla") or die(mysql_error());
$blabla1 = mysql_query("SELECT * FROM gallery WHERE id_cat=1");
$blabla2 = mysql_query("SELECT * FROM gallery WHERE id_cat=2");
$blabla3 = mysql_query("SELECT * FROM gallery WHERE id_cat=3");
So, is there anything I need to do for security? :/ like sql-injection or anything else. there is nothing going to url. it is just www.blabla.com/gallery.php
appreciate advises!!! thanks a lot!
© Stack Overflow or respective owner