$query_NP = "SELECT Name_Predm, ID_Predm FROM Predmety WHERE ID_Group = '$IG'";
$result_NP = mysql_query($query_NP) or die ( "Error : ".mysql_error() );
while (($query_NP1 = mysql_fetch_assoc($result_NP)))
{
$NP= $query_NP1['Name_Predm'];
$ID_Predm= $query_NP1['ID_Predm'];
echo '<a href="new1.php?ID_Predm=' . $ID_Predm. '">' . $NP . '</a><br>' ;
}