Yes, that will work as well. Using getChunk() is a little less sensitive to the parsing order and less prone to conflicts, but your method usually works fine.
BTW, if you only have one, you can just use this:
$modx->setPlaceholder('uid', $_POST['uid']);
If the snippet is called uncached (and I think it should be), you shouldn't need to have the placeholder tag uncached.
------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using.
MODX info for everyone:
http://bobsguides.com/modx.html