Nai,
It looks like you may be trying to process the form data before it was posted. Until it is posted by the user, you have no access to the data entered (it is just sitting on your user's browser). Be sure that you have a submit button and you know where it is submitting your form data to (this is where you will need to process your form data).
For example, a submit button for the form statement:
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
will result in the data being posted recursively to the same page that your form is on. You should then have an "IF" statement at the top of your page to check to see if the page is loading due to a submission to itself:
if (isset($_POST['submit'])) {
}
Within this "IF" statement is where you should process your data. Of course, if your page is loading for the first time, it will skip this "IF" statement and just display the form.
I hope this helps.
Regards,
Kris Cox