Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

If statement or Select Case?

Participant ,
Apr 25, 2008 Apr 25, 2008

Copy link to clipboard

Copied

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.
TOPICS
Server side applications

Views

265
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 25, 2008 Apr 25, 2008

Copy link to clipboard

Copied

LATEST
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/

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines