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. Quote 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"; Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.