Page 1 of 1

Include Function help

Posted: Thu Mar 13, 2008 12:12 pm
by bomanda
I'm new to PHP. I am using a php photo gallery script. I want to include a specific category on a page specific to a certain category in my photo gallery.

I usually would just put the following to include my entire photo gallery on a page:

<?php @include_once( $_SERVER["DOCUMENT_ROOT"]."/gallery/index.php" ); ?>

But what I really want to do is something more like this that would only display a certain category in my photo gallery:

<?php @include_once( $_SERVER["DOCUMENT_ROOT"]."/gallery/index.php?gazpart=show&gazgal=1" ); ?>

but when I use this code, my photos do not display. Any suggestions?

Re: Include Function help

Posted: Thu Mar 13, 2008 3:15 pm
by Christopher
Do:

Code: Select all

<?php
$gazpart = 'show';
$gazgal = 1;
@include_once( $_SERVER["DOCUMENT_ROOT"]."/gallery/index.php" );
?>

Re: Include Function help

Posted: Thu Mar 13, 2008 3:21 pm
by kryles
wait, the import grabs the GET values? how is that :?

Re: Include Function help

Posted: Thu Mar 13, 2008 4:23 pm
by bomanda
Thanks for the suggestion, unfortunately I can't get it to import the values.

Take a look here:
http://www.campanjigami.com/gallery/fish/

When going to the above address, I want it open the "Fish" category, not the individual categories as shown.

Also, just as a side note, I changed the gazgal value to "6" for the Fish Category.