Maybe this will help. This is a line from your code:
<form action='<?=$_SERVER["PHP_SELF"]?>' method="post">
When I run this code I get this error message: "You don't have permission to access /php/ (...) on this server."
Try changing that line to this:
<form action='<?php echo $_SERVER['PHP_SELF'] ?>' method="post">
Note:
<?= expression ?> This is a shortcut for "<? echo expression ?>"
Short tags are only available when they are enabled via the short_open_tag php.ini configuration file directive, or if php was configured with the --enable-short-tags option.
I hope that helps...