yield return WWW; not returning

Been trying to implement a highscore system, and I was just testing/starting out with the standard highscore found in the wiki.

http://www.unifycommunity.com/wiki/index.php?title=Server_Side_Highscores

Been having issues though, it wouldn't add scores to the database. Using identical php scripts from the wiki except for own values and rewrote the javascript to c#.

IEnumerable PostScore(string username, int score)
{
    var hash = Md5Sum(username + score + _secretKey);
    var highscoreUrl = _addScoreUrl + "name=" + WWW.EscapeURL(username) + "&score=" + score + "&hash=" + hash;

    var hsPost = new WWW(highscoreUrl);
    yield return hsPost; // Wait until the download is done
    if(hsPost.error != null)
    {
        print("There was an error posting the high score: " + hsPost.error);
    }
}

Never worked. I checked to make sure md5 matched, i printed off the url and manually used it and it all worked fine, but when that script runs it never added a score to the database.

I finally decided to test it without the yield

void PostScore(string username, int score)
{
    var hash = Md5Sum(username + score + _secretKey);
    var highscoreUrl = _addScoreUrl + "name=" + WWW.EscapeURL(username) + "&score=" + score + "&hash=" + hash;

    var hsPost = new WWW(highscoreUrl);
}

Works fine, adds the score to the database but I'd obviously like the added functionality and options of using the yield so could anyone explain to me why it's not working?

Make sure you're calling the function with StartCoroutine(PostScore(username, score));

If you leave that off, you'll end up with it just not doing anything in that function

If that's not it, i would suggest a slightly different yield:

while (!hsPost.isDone && hsPost.error == null)
{
    yield return null;
}

That should pause until the download is complete or you get an error