Tweaked db code in POST.