The method you are using is to DEFINE a function. The defining action occurs on the form page, and the variable is sent to the action page. Does that make sense?
form page:
<input type=text name=a_var>
if the user enters "joe" for this field, on the action page you would say:
echo $a_var;
and "joe" would print on the page.