Jump to content


Getting unknown error msg, Help!


4 replies to this topic

#1 SiteReboot

    Young Padawan

  • Members
  • Pip
  • 26 posts
  • Gender:Male
  • Interests:www.sitereboot.com

Posted 08 February 2007 - 11:21 PM

On a page i am trying to access i get the following error msg:
Parse error: parse error, unexpected '<' in /homepages/7/d94330934/htdocs/********/tutorials/tutorials_admin.php on line 17

What i have on line 17 is: <center><a href='tutorials.php'>View Categorys</a> | <a href='tutorials.php?action=addtutorial'>Add Tutorial</a> | <a href='tutorials_admin.php'>Admin</a> | <a href='tutorials_admin.php?action=addcategory'>Add Category</a></center>

Maybe im just tired, and missing it.
Any help would be appreciated.

#2 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 09 February 2007 - 02:45 AM

Could you show us the code before line 17?

#3 SiteReboot

    Young Padawan

  • Members
  • Pip
  • 26 posts
  • Gender:Male
  • Interests:www.sitereboot.com

Posted 09 February 2007 - 07:05 AM

Ok here is all of it up to line 17

<?php
//------------------------------------------
//database connection
include("include.php");
//end database connection
//------------------------------------------

//-------------------------------------------
// 
// 
// 
//------------------------------------------


//------------------------------------------
//echo out a navigation panel
<center><a href='tutorials.php'>View Categorys</a> | <a href='tutorials.php?action=addtutorial'>Add Tutorial</a> | <a href='tutorials_admin.php'>Admin</a> | <a href='tutorials_admin.php?action=addcategory'>Add Category</a></center>


#4 Mr. Matt

    Moderator

  • P2L Staff
  • PipPipPipPip
  • 1,945 posts
  • Gender:Not Telling

Posted 09 February 2007 - 09:58 AM

Well thats simple, you can't print out html to the browser when you still have the php tags open like that. Either you close the php tag and then have the html and re-open the php tag after, or you use the echo function and encase what you want to echo in a string.

Ex 1:

<?php
//------------------------------------------
//database connection
include("include.php");
//end database connection
//------------------------------------------

//-------------------------------------------
//
//
//
//------------------------------------------


//------------------------------------------
//echo out a navigation panel
?>
<center><a href='tutorials.php'>View Categorys</a> | <a href='tutorials.php?action=addtutorial'>Add Tutorial</a> | <a href='tutorials_admin.php'>Admin</a> | <a href='tutorials_admin.php?action=addcategory'>Add Category</a></center>

<?php

Ex 2:

<?php
//------------------------------------------
//database connection
include("include.php");
//end database connection
//------------------------------------------

//-------------------------------------------
//
//
//
//------------------------------------------


//------------------------------------------
//echo out a navigation panel
echo "<center><a href='tutorials.php'>View Categorys</a> | <a href='tutorials.php?action=addtutorial'>Add Tutorial</a> | <a href='tutorials_admin.php'>Admin</a> | <a href='tutorials_admin.php?action=addcategory'>Add Category</a></center>";


#5 SiteReboot

    Young Padawan

  • Members
  • Pip
  • 26 posts
  • Gender:Male
  • Interests:www.sitereboot.com

Posted 09 February 2007 - 05:25 PM

Thank you everyone for the help.
Matt your second example pretty much resolved this problem.
Other than another small error on down the page, which was simple to resolve.
Again thank you for the help.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users