added form handling on index.php