prepare("SELECT * FROM post WHERE blog_id IN (SELECT user_id FROM user WHERE username='$user' AND password='$password') ORDER BY data_dodania"))
{
$sql->execute();
$sql->bind_result($post_id,$trash,$title,$description,$main,$img,$date,$mod_date);
while ($sql->fetch())
{
echo "