All the POST variables are read right near the start of the script. post_stuff() is then called with the big list of variables. You can either change this to include new ones all the way through, or as it happens, $query is a global variable so $query->param("whatever") works everywhere (this is easier to do, but less neat).