Login Register






[PHP] Protection from SQL injection filter_list
Author
Message
[PHP] Protection from SQL injection #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]
Don't learn to hack, hack to learn.






Messages In This Thread
[PHP] Protection from SQL injection - by KaiT_AleX - 07-25-2011, 04:30 AM