Skip to main content
Inspiring
April 25, 2008
Question

If statement or Select Case?

  • April 25, 2008
  • 1 reply
  • 284 views
Hi all,
I'm need to include a file named after the categories so a page called flyers.php is called when the category called "Flyers" is clicked.


then I tried using this code
if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {

And then added it like this:

<td><?php
if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
echo include 'flyers.php';
}
?>
<!--/*<?php // include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?>*/--></td>

But the problem I'm getting is, that nothing comes up on any of the categories, is there something i've missed?

Currently I have this:

<?php
//if ($current_categorie_id =='Flyers') {
echo include 'flyers.php';
//}
?>

But this only displays the file on the top most category: "Business Stationary"

Any help or ideas?
P.S I am using osCommerce. Sorry.
This topic has been closed for replies.

1 reply

Inspiring
April 25, 2008
The_FedEx_Guy wrote:
> if (isset($HTTP_GET_VARS['filter_id']) &&
> tep_not_null($HTTP_GET_VARS['filter_id'])) {

I presume that tep_not_null() is a custom function. It's certainly not
part of standard PHP. So, you need to make sure that's working.

The other thing is that $HTTP_GET_VARS was deprecated many years ago,
and doesn't work on many modern servers. Use $_GET instead.

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/