[PHP] Protection from SQL injection 07-25-2011, 04:30 AM
#1
PHP Code:
<?php
session_start();
if(!is_numeric($_GET['id']))
{
die("If i am vuln on this, i will not be a coder !");
}[/color]
$result = mysql_query("SELECT * FROM notifications WHERE id='$id'");
while($row = mysql_fetch_array($result))
{
$text = $row['text'];
echo $text;
}
?>![[Image: 1308031172619.gif?w=356&h=140]](http://thechive.files.wordpress.com/2011/06/1308031172619.gif?w=356&h=140)
Don't learn to hack, hack to learn.




![[+]](https://sinister.li/images/modern/collapse_collapsed.png)