21 $sql = "select tag from searchtagged where ID_TAG = ".$id."";
$current_tag_name = $g[0];
Alıntıladığım yerleri aşağıdakilerle değiştirip dener misiniz?
$sql = "select tag from searchtagged where ID_TAG ='$id'";
$current_tag_name = $g['tag'];
Bir de hocam çok fazla değişken atayıp kod hamallığı yapmışsınız.