| | |
PHP includes & variables
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Sep 2006
Posts: 20
Reputation:
Solved Threads: 0
I don't have much time to say this but I'm going to try and hurry...
Here's a snippet of code:
Inside of contentHeader:
--------------------------
I know that this variable is correct because I had tried to use it on the original page that has the include file and it works. However when I try to echo it using the include page, it does not work. I can't explain in great detail right now but all I know is I need to get that variable from the original page and allow it to echo in contentHeader. What could I be doing wrong?
Thanks!! Sorry for the rush, hope you can answer
--Mike
Here's a snippet of code:
•
•
•
•
$subName = "someName";
include "contentHeader.php";
•
•
•
•
echo $subName;
I know that this variable is correct because I had tried to use it on the original page that has the include file and it works. However when I try to echo it using the include page, it does not work. I can't explain in great detail right now but all I know is I need to get that variable from the original page and allow it to echo in contentHeader. What could I be doing wrong?
Thanks!! Sorry for the rush, hope you can answer
--Mike
That looks like that should work. Is an error message being displayed? Maybe set error reporting to report all errors. If there is a minor issue that may report it to you.
John Conde
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
![]() |
Similar Threads
- Basic PHP Includes (PHP)
- Test For Php Includes (PHP)
- PHP Includes??? (PHP)
- Host Matrix - Free Php Hosting & Webmaster Resources. (Web Hosting Deals)
- Multiple PHP INCLUDES (PHP)
Other Threads in the PHP Forum
- Previous Thread: Making thumbnails in PHP
- Next Thread: Filtering My sql through Php using drop down menu and text field
| Thread Tools | Search this Thread |
apache api array beginner binary broken cache cakephp checkbox class cms code confirm cron curl customizableitems database date display dynamic echo email error external fcc file files folder form forms forum freelancing function functions google header headmethod howtowriteathesis href htaccess html iframe image include insert ip javascript joomla limit link login mail malfunction menu method mlm mod_rewrite multiple mysql neutrality oop pageing pagerank paypal pdf php phpmysql play problem query question radio random recursion remote root script search select server sessions sms soap source space sql support! syntax system table template tutorial update upload url validator variable video web youtube






