Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: PHP and MySQL 24-Hour Trainer
This is the forum to discuss the Wrox book PHP and MySQL 24-Hour Trainer by Andrea Tarr ; ISBN: 978-1-1180-6688-1
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: PHP and MySQL 24-Hour Trainer section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old July 23rd, 2014, 07:12 PM
Registered User
Points: 10, Level: 1
Points: 10, Level: 1 Points: 10, Level: 1 Points: 10, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2014
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.
  #2 (permalink)  
Old August 30th, 2015, 11:33 AM
Registered User
Points: 11, Level: 1
Points: 11, Level: 1 Points: 11, Level: 1 Points: 11, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2015
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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 ; )


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where is Chapter 10 code dejohnny BOOK: Beginning ASP.NET Web Pages with WebMatrix 1 June 3rd, 2012 06:59 AM
Bug: Code Example Chapter 10 Earthquake 3 keling BOOK: Professional Android 2 Application Development 1 January 12th, 2012 05:03 PM
Is there code example for chapter 10 - Web Parts? krahman01 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 April 16th, 2010 07:54 PM
Chapter 10 Sample Code jramkawsky BOOK: Professional Java Development with the Spring Framework 0 December 3rd, 2005 08:44 AM





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