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 Browser Persistent Data with PHP Data Persistence on the Web Using Forms for Persistence

I have a little question at the end of the video

At the end of the video, the method already changed to the 'Post'. But the filter_input() is still INPUT_GET not INPUT_POST. So i just wonder, you can change the method to the post, but you can still use INPUT_GET to filter the value?

Thank you so much! I hope someone can help me out

1 Answer

Johannes Chitura
seal-mask
.a{fill-rule:evenodd;}techdegree
Johannes Chitura
PHP Development Techdegree Student 8,907 Points

Hi Miha. The short answer is yes; you can use the POST method and use INPUT_GET at the same time.

In this particular example, since the values we are filtering are from the URL, we use the INPUT_GET type because that is where the information is coming from.

Remember, we can pass a URL parameter along with a posted form.

I hope this helps.

Ok, thank you so much!!!