better code for GET/POST select