$uid=cekeceğin_veri;

$bilgi= mysql_query("SELECT * FROM messages WHERE uid='$uid';");