p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: PHP and MySQL 24-Hour Trainer (http://p2p.wrox.com/forumdisplay.php?f=659)
-   -   Chapter 10 code (http://p2p.wrox.com/showthread.php?t=93328)

NYCrgb July 23rd, 2014 07: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.


nbnyc August 30th, 2015 11:33 AM

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 08:51 AM.

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