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 Redirecting After a Form Submission

Steven Chan
Steven Chan
6,526 Points

Hitting back after landing on thanks.php, the suggest.php page still has the fields filled (not blank)

I pretty much copied the code verbatim, but am unsure why when I hit back button, the suggest.php page has the name, email address, and details field still filled in. I thought they should be blank again, like in the video.

Robert Cooper
Robert Cooper
22,704 Points

My fields remain filled-in as well when I hit the back button. I'm not too concerned though.

3 Answers

Hitting back on your browser to form will keep the form filled in because it's the browsers memory that's putting the data back there. If you refresh a browser whilst on a form page the details will be gone.

As for skipping over processing.php, what do you mean? It runs processing.php then it follows the header redirect to the thanks.php like it's supposed to.

coskun olcucu
coskun olcucu
5,340 Points

Hi, I have the same issue like you guys have it. I turned off auto complete on my browser setting,but still no luck. can you guys let me know if you find out solution? thank you

I think its a bloody feature albiet unwelcome but I wish someone could explain why there is a skip over processing.php? Is it because of the form action redirect? Or the fact it doesn't have the html to support itself independently?