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 trial
Luke Briedis
3,600 PointsSame page PHP form submissions and ajax?
I was starting to learn how to submit forms through ajax to skip reloading a page, I just finished the PHP courses here and in the shop example, all the forms submit on their respective pages and refresh, looping through lots of if statements based on what's received. Is it possible to work with ajax and these methods or do I need to reference submit.php externally as normal? Cheers.
1 Answer
Matt Campbell
9,767 PointsJust put the submit file in your Ajax request, it's getting the file essentially and then loading another file once the tests are passed so you'd do a request for the check file and then at the end of that another request to get the success file.