<?php

$username = trim($_GET['username']);

if (!empty($username)) {

   mysql_connect('localhost','nazwa_uzytkownika','haslo');
   mysql_select_db('baza_danych');

   $count = mysql_query("SELECT count(user_login) from wp_users where user_login = '$username'");
   if ($count) 
      echo mysql_result($count,0);
} else {
   echo "0";
}
?> 
