Last active
August 29, 2015 14:24
-
-
Save iAklis/1c423d55eb360137a94a to your computer and use it in GitHub Desktop.
强网杯-最好的语言100分
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//TODO: connect to DB | |
$id = $_GET['id']; | |
//TODO: sqli filter | |
$secretId = 1024; | |
if($id == $secretId){ | |
echo 'Invalid id ('.$id.').'; | |
} | |
else{ | |
$query = 'SELECT * FROM notes WHERE id = \''.$id.'\';'; | |
$result = mysql_query($query,$conn); | |
$row = mysql_fetch_assoc($result); | |
echo "notes: ".$row['notes']."</br>"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment