bluewaves Posted July 11, 2010 Share Posted July 11, 2010 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. Link to comment https://forums.phpfreaks.com/topic/207436-declaring-a-variable-that-an-include-php-file-can-insert-into-a-query/ Share on other sites More sharing options...
.josh Posted July 11, 2010 Share Posted July 11, 2010 $variable = "value"; Link to comment https://forums.phpfreaks.com/topic/207436-declaring-a-variable-that-an-include-php-file-can-insert-into-a-query/#findComment-1084494 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.