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.
Getting unknown error msg, Help!
Started by SiteReboot, Feb 08 2007 11:21 PM
4 replies to this topic
#1
Posted 08 February 2007 - 11:21 PM
#2
Posted 09 February 2007 - 02:45 AM
Could you show us the code before line 17?
#3
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
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:
Ex 2:
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
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.
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
