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

PHP

DIJITUL UK
DIJITUL UK
17,246 Points

The information I put into my contact form appears in the URL of the page when I click submit, what is going wrong?

http://port-80-9qfumuxcnj.treehouse-app.com/contact?name=Joe+Bloggs&email=Joe%40bloggs.com&msg=Hi%2C+Waldo

- When I type in this information into the contact form :

Name: Joe bloggs E-Mail: Joe@bloggs.com Message: "Hi, Waldo"

the information is added onto the URL of the page?

/contact?name=Joe+Bloggs&email=Joe%40bloggs.com&msg=Hi%2C+Waldo

I am not redirected back to the home page

if ($result > 0) { // sand a message that says thank you $app->redirect('/'); }

which is what that block of code should make it do so i've obviously gone wrong a fair amount down the line. Any help with this?

Here is my source code:

http://pastebin.com/mTBhejJL

1 Answer

DIJITUL UK
DIJITUL UK
17,246 Points

Got it, missed an "=" when setting the form method to POST, so it defaulted to GET.