The Issue:
Undefined POST variables after form submission.
Research and Troubleshooting Done:
You can use input type button instead of button you are using, In this case you can send data using ajax.