if ($veri=mysql_fetch_array(mysql_query("select * from dukkan WHERE sahibi='$username'"))) { echo 'almışsın'; } else { echo 'almamış'; }