Trouble adding contact form to my non-wordpress site
Hello, I'm a beginner and I am currently having trouble to add a simple contact form to my website. I've been searching for solutions here and there but couldn't find anything. I've even installed sendmail and postfix but still no luck. This is not a wordpress site but a site I built myself.
On my HTML, I have the form pointing to index.php and the form itself shows in the frontend. But when I click submit I go to a page that reads '405 Not Allowed nginx/1.4.6 (Ubuntu)'
When I upload my index.php to /var/www/mysite/html I also get a blank page on my homepage.
My error log also shows "Undefined index:" notice for each line of my php file. I know this is obviously a red flag but I haven't been able to correct this despite numerous efforts.
As you can see, I think there's a multitude of things that seems to be going wrong.
If you can provide me some assistance I thank you in advance. I can also provide more information if need be.