Reputation: 17
I am creating my first ever website. I have created a PHP Contact Form. Right now, my html and php files are stored locally, and I do not have a web host yet.
When the Submit
button is clicked, the PHP file is downloaded, rather than the email message being sent. How can I get the Contact Form to send an email? Do I need a web host, first, before I can do this?
Upvotes: 0
Views: 172
Reputation: 219814
Sounds like you are loading your HTML files in a web browser and when they submit to the PHP page it loads the page. This is because you need a web server to actually process the PHP script.
If you're running Windows you can look into WAMPServer.
There's also MAMP for Macs.
And Xampp which works on Windows, Macs, and Linux.
There are lots of tutorials for using each f them so getting started should be easy to do.
Upvotes: 4