Thank you for your reply.
The 'undefined variable' error is caused when form is 'submitted'.
This error showed up for each variable assigned in the form with 'value = "<? php $var_name ?>">'... where the $var_name was predefined in this format, as an example:
<? php
$var_name = "var_value";
?>
Thanks.