diff --git a/img/index.php b/img/index.php index 1aaec64..77c52fa 100755 --- a/img/index.php +++ b/img/index.php @@ -10,8 +10,9 @@ * ----------------------------------------------------------- * TODO: * - * Image tag sorting + * Image tag sorting - Single tag sorting possible * Properly align image in post box + * Search with multiple terms * JavaScript fo show bigger image if clicked * Convert to mysqli * @@ -66,7 +67,7 @@ echo "

Pictures uploaded with the tag: ".$_GET['tag'].":

"; require('dbsettings.php'); $tag = sanitize($_GET['tag']); - $sql = "SELECT id, name, location, type, size, time, comment, username, tags FROM $tbl_name WHERE 'tags' LIKE '$tag'"; + $sql = "SELECT id, name, location, type, size, time, comment, username, tags FROM $tbl_name WHERE tags LIKE '%$tag%'"; $result = mysql_query($sql); $count = mysql_num_rows($result); if($count >= 1){ @@ -81,7 +82,7 @@ $comment = $row['comment']; $username = $row['username']; $tags = $row['tags']; - echo "$img - $time - $size - Username: $username
"; + echo "$img - $time - $size - Uploader: $username
"; } } echo "



";