Jump to content

Declaring a variable that an Include PHP file can insert into a query


bluewaves

Recommended Posts

I developed a site that uses 4 php include files (header, footer, leftside, rightside)

 

What I want to be able to do is to have the right side column read from the

header file the topic the page is about and then run a query to display

results.

 

For example, say I set a variable on each individual page that is the

topic of the page - like "cats"

 

My right side include should put the word cats into it's query so that

I can display discounts for cat products.

 

Please let me know if I need to provide other information. Because I don't

have experience declaring a variable, I need to know exact code and where

on the page it would need to be.

 

My guess is that I could declare the title as a variable, but it would have so many

words in it that I wouldn't know how to effective use it.

 

Thanks.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.