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 Build a Basic PHP Website (2018) Adding a Basic Form Checking the Request Method

coskun olcucu
coskun olcucu
5,340 Points

I have an issue with the form.

Hi All, On the form redirecting course,Alena created a new thank you page and redirect the user a new page after form filled out.When she refreshes the page,she stays on the same page.If she hits back button on web browser,it displays a form page all of the fields are empty.

In my case I did the same thing what she did on the course,but When i hit the back button on the browser,it displays form page with filled out every field.

2 Answers

Diar Selimi
Diar Selimi
1,341 Points

That might be that your form have not been submitted or saved.

geoffrey
geoffrey
28,736 Points

Hi coskun olcucu , from my understanding, this is normal behaviour. Most browser cache form input values. So when user refreshes page, the inputs have same values. If ever you don't want that behaviour by default, there is the possiblity to override it.

Hope it helps.