Someone told me that he had hack my script already using sql injection,
i wonder how to repair this thing,
myscript is like this below.
he hacked by adding in URL like this
/engine.php?progess=whspop&whisperid=20%20OR%201=1
the addition is this
%20OR%201=1
i am somehow suggest him don;t know my sql structure, or i will be in trouble already.
if i change a bit to like this
/engine.php?progess=whspop&whisperid=20%20OR%20whisperid=50
then he will got the number 50 already not only 20 but he can get all number.
is there a way to secure this thing ?
thanks,
i wonder how to repair this thing,
myscript is like this below.
| Code: |
|
echo $_GET["whisperid"]."<br>"; $string="select * from data where nomor='".mysql_real_escape_string($_GET["whisperid"])."'"; echo $string; $query = mysql_query($string,$dbz) or die("my_sql error()"); |
he hacked by adding in URL like this
/engine.php?progess=whspop&whisperid=20%20OR%201=1
the addition is this
%20OR%201=1
i am somehow suggest him don;t know my sql structure, or i will be in trouble already.
if i change a bit to like this
/engine.php?progess=whspop&whisperid=20%20OR%20whisperid=50
then he will got the number 50 already not only 20 but he can get all number.
is there a way to secure this thing ?
thanks,
