I dont think that you can directly post your data to your function. You must post your form data to an action file something.php where your action file can be your same file that has your form. So do like NogDog says or like this:
<form action="" method="post">
form elements
</form>
And you can take your posted data as $_POST[formelement_name];