The easiest way is to just SELECT them. But in a single SELECT.
to something like
SELECT @v_playerId AS playerid, v_gamerName AS gamename;
And then in your PHP code you can just treat those the same as from any SQL SELECT.
However, it would be a good idea to *always* return two values.
So you might want to do
SELECT -1 AS playerid, '' AS gamename;
so that your PHP code can easily detect whether you are getting back a real playerid or, essentially, a message that says "nope, no playerid here".