它對我的數據庫表編輯兩個字段(note_name和note_description),我需要從一個形式類似這樣的鏈接,並在新的領域的一些信息:通過LINKS進行SQL注入?
LINK:
/main_edit.php?edit=note_name2&type=PHP
AND:
elseif(isset($_GET['edit'])){
$note_type=$_GET['type'];
$old_note_name=$_GET['edit'];
$new_note_name=mysql_real_escape_string($_POST['new_note_name']);
$new_note_description=mysql_real_escape_string($_POST['new_note_description']);
$query="UPDATE functions
SET note_name='{$new_note_name}',
note_description='{$new_note_description}'
WHERE note_name='{$old_note_name}'
";
$result = mysql_query($query, $connection);}
是SQL注入通過鏈接可能在這裏,如果是的話如何保護它呢?
謝謝!
供參考:通常情況下,一個離開的時候反對投票,以便回答者可以改善他們的答案評論。沒有評論的反對票沒有意義。 – 2011-12-13 22:28:56