[SOLVED] Confusing Parse Error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Bbob
Forum Commoner
Posts: 57
Joined: Sat Aug 07, 2010 4:46 am

[SOLVED] Confusing Parse Error

Post by Bbob »

Hi Im getting a Parse error: parse error, unexpected '<' in C:\wamp\www\hp\sidebar.php on line 2

But theres nothing wrong in line 2.

The code below is just the sidebar for my webpage. I saved those codes in sidebar.php and called it in my main page by <?php include("sidebar.php"); ?>

Code: Select all

<?php
	<h3>Customer Order</h3>
	<ul class="nav">
		<li><a href="admin_customerstockorder.php">Customer Stock Order</a></li>
		<li><a href="admin_customerneworder.php">Customer No-Stock Order</a></li>
		<li><a href="admin_viewcustomerorder.php">View Customer Orders</a></li>
	</ul>

	<h3>Job Order</h3>
	<ul class="nav">
		<li><a href="admin_createjoborder.php">Create Job Order</a></li>
		<li><a href="admin_viewjoborder.php">View Job Order</a></li>
	</ul>
	
	<h3>Purchase Order</h3>
	<ul class="nav">
		<li><a href="/">Create Purchase Order</a></li>
	</ul>
	
	<h3>Reports</h3>
	<ul class="nav">
		<li><a href="inventoryreport.php">Inventory Report</a></li>
	</ul>
?>
Last edited by Bbob on Sat Aug 14, 2010 5:29 am, edited 1 time in total.
User avatar
MindOverBody
Forum Commoner
Posts: 96
Joined: Fri Aug 06, 2010 9:01 pm
Location: Osijek, Croatia

Re: Confusing Parse Error

Post by MindOverBody »

Obviously, you are writing HTML code inside PHP tags ;)
Bbob
Forum Commoner
Posts: 57
Joined: Sat Aug 07, 2010 4:46 am

Re: Confusing Parse Error

Post by Bbob »

Oh...I thought I was suppose to enclose the code inside the php tag for the include to work....


That is so stupid of me haha
Post Reply