p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/)
-   BOOK: PHP and MySQL 24-Hour Trainer (http://p2p.wrox.com/book-php-mysql-24-hour-trainer-659/)
-   -   Chapter 10 code (http://p2p.wrox.com/book-php-mysql-24-hour-trainer/93328-chapter-10-code.html)

NYCrgb July 23rd, 2014 08:12 PM

Chapter 10 code
 
I am confused exactly how the parameters are being used and passed to the loadContent function.
First, I do not see any documentation on INPUT_GET. I understand _Get[] but what is INPUT_GET. Searching the php documentation showed nothing.
It seems the function just selects the different php files to include thereby changing the html. So I get that $where takes the parameter for what to load into the html by the return statement. But why the second variable- default. For example for the sidebar couldn't you just call loadcontent(catnav) and that would include the sidebar cat nav. Why is sidebar passed. Does t this link it to the div id# in the index.php?
I am clearly missing something some further explanation would be appreciated.

Thanks.

nbnyc August 30th, 2015 12:33 PM

From looking at http://php.net/manual/en/function.filter-input.php...

It seems that INPUT_GET is a value for the "type" parameter of the filter_input() function.

So basically you're telling filter_input() where to look for the variable you want filtered.

This is how filter_input() wants this info, so that's how you have to provide it ; )


All times are GMT -4. The time now is 05:41 AM.

Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
2013 John Wiley & Sons, Inc.