PHP Contact Form
I have a static index.html running on a nginx server. I have a simple form element that takes in a user’s contact details and sends a POST request to inc/sendEmail.php. I haven’t set up any mail system on my droplet so maybe that’s why it’s not sending any email? Everything code wise looks pretty solid but I’m not sure where to start to get my code to start working for me. I’m running Ubuntu 18.04 and NGINX. When I hit submit I get a ‘200 OK’ response from jquery sending the post to the PHP script but that’s as far as it goes and then it throws my error something went wrong. Any advice is appreciated.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.