Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJohn Levy
1,451 PointsHow to make a contact from work with HTML and PHP
I have made a simple contact form with HTML and PHP. I uploaded both files to my server but it still does not send when I try to send a e-mail. How are they supposed to be linked? For example I know how to link a html and css file together but I cannot see anywhere where it shows how the PHP file is linked to the HTML file. I have attached my code below (the PHP code is in the javascript box) http://codepen.io/Johned22/pen/GNqOxd Where am I going wrong? Thanks in advance
3 Answers
jason chan
31,009 Pointshttps://teamtreehouse.com/library/building-websites-with-php
This tutorial, but you need php server though. You can try pushing this to heroku as your backend.
John Levy
1,451 PointsThanks for your advice. I am new to this and only really been working on HTML and CSS so can you explain a little when you said I need a php server? Right now I use hostgator can I use something within hostgator for this? I am still n ot sure what a php server is. Thanks
jason chan
31,009 Pointshttps://teamtreehouse.com/library/build-a-basic-php-website
I found the newer tutorial from our new php instructor. Just watch this tutorial.
You can ftp the files onto the server.
You would use ajax to make contact form work on codepen.io so you need to learn jquery