Ok. Now it works. I changed code from $result = mysql... to if statement like this:
$result = mysql_query($query, $mysql);
if(mysql_num_rows($result) >0)
but it still didnt work, so i inserted this line after if statement:
echo "$result";
Now it works but i have no idea why and how. 😕