Page 1 of 1

[SOLVED] Confusing Parse Error

Posted: Sat Aug 14, 2010 5:07 am
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>
?>

Re: Confusing Parse Error

Posted: Sat Aug 14, 2010 5:10 am
by MindOverBody
Obviously, you are writing HTML code inside PHP tags ;)

Re: Confusing Parse Error

Posted: Sat Aug 14, 2010 5:28 am
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