Submit button returns to index page instead of sending data

Put var_dump($_SERVER['PHP_SELF']); at the top of header.php and you will see the problem. That always points to index.php because nearly everything loads through index.php.

Use get_permalink to get the “apparent” URL and use that instead of $_SERVER['PHP_SELF'] in the form action attribute.