Newby to PHP here.... (Google Analytics)

Reply

Join Date: Nov 2007
Posts: 3,760
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 332
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: Newby to PHP here.... (Google Analytics)

 
0
  #11
Jan 31st, 2008
hmm.. I dont see anything wrong with this. What I dont understand is, how come your footer(allied_footer.php) starts off with no <html> tag, no <body tag, no <table> tag ! Are you sure this is all you have in allied_footer.php ? Are you sure you dont have any <? in between ?
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 9
Reputation: AP1 is an unknown quantity at this point 
Solved Threads: 0
AP1 AP1 is offline Offline
Newbie Poster

Re: Newby to PHP here.... (Google Analytics)

 
0
  #12
Jan 31st, 2008
Yep.... Perhaps you have found the issue???

Sounds like I need to add some lines of code at the top????
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,760
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 332
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: Newby to PHP here.... (Google Analytics)

 
0
  #13
Jan 31st, 2008
Well, yeah.. Add all the tags.. Search your code for "?". Check if its either <?php or ?>.
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 9
Reputation: AP1 is an unknown quantity at this point 
Solved Threads: 0
AP1 AP1 is offline Offline
Newbie Poster

Re: Newby to PHP here.... (Google Analytics)

 
0
  #14
Feb 1st, 2008
Hi Nav,

I did a little more research on the issue of allied_footer.php not having the information you believe is missing.

All of the example footer.php files I have seen on the net do not have any of that info.

The following is one of these examples where the footer file seems to rely on the header file, or index file for that stuff???

http://www.bobsmithphotography.net/a-little-php


Thank you for your help
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 9
Reputation: AP1 is an unknown quantity at this point 
Solved Threads: 0
AP1 AP1 is offline Offline
Newbie Poster

Re: Newby to PHP here.... (Google Analytics)

 
0
  #15
Feb 1st, 2008
FYT.... This is the error I have at the bottom of my pages with your latest code....

Parse error: parse error, unexpected T_INCLUDE_ONCE in /home/content/B/r/1/Hidden/html/-APPI-/NAV/allied_footer.php on line 26
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 57
Reputation: Walkere is an unknown quantity at this point 
Solved Threads: 5
Walkere Walkere is offline Offline
Junior Poster in Training

Re: Newby to PHP here.... (Google Analytics)

 
0
  #16
Feb 1st, 2008
Originally Posted by AP1 View Post
Parse error: parse error, unexpected T_INCLUDE_ONCE in /home/content/B/r/1/Hidden/html/-APPI-/NAV/allied_footer.php on line 26
This usually comes from having a missing semicolon. The previous statement was never closed, so PHP isn't ready to begin a new statement - like require_once.

Check that lines 25 and 26 look like this (taken from the code pasted earlier)...

  1. $virtual_page = "Main_Page";
  2. include_once "analyticstracking.php";

If there's no missing semi-colon, then there shouldn't be a reason for that error.

As for the <html> tags, they shouldn't be in the footer.

Generally the way the templating system works is...
  • * Header.php - includes opening html tag, head tags, and opening body tag
    * Page.php - includes the main content - everything inside the body tag
    * Footer.php - includes the closing body and closing html tags, along with any footer info

In fact it seems rather strange that the analytics page (which you are including) contains all those tags. Since it's in the middle of an existing page, that might screw up the html.

- Walkere
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,760
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 332
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: Newby to PHP here.... (Google Analytics)

 
0
  #17
Feb 1st, 2008
How come the error keep changing from
Parse error: parse error, unexpected '?' in /home/content/B/r/1/Hidden/html/-APPI-/NAV/allied_footer.php on line 25
to
Parse error: parse error, unexpected T_INCLUDE_ONCE in /home/content/B/r/1/Hidden/html/-APPI-/NAV/allied_footer.php on line 26
? Comment the include_once line and check if you still get the error.
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC