Hi,

I have a syntax error on the following code which I am struggling to fix. Is there any form of validator or techniqie I can use to resolve it?

Code:
syntax error, unexpected ';'
Code:
<?php
include "access.php"; 

if(isset($_POST['category'])){
	
	$_POST['category'] = trim($_POST['category']);
	
	if(!empty($_POST['category'])) {
		$error = "Please select a category.";
	}
	
	if(!isset($error)) {
		$category = mysql_real_escape_string($categories[$_POST['category']]);
		$linkcategory = str_replace(' ', '-',strtolower($_POST['category']);
		$linkcategory = mysql_real_escape_string($linkcategory);
		$sql = "INSERT INTO organiserdbase (category, linkcategory) VALUES ('$category','$linkcategory')";
		echo "$sql";
		/*
		$query = mysql_query($sql);
		if($query) {
		} else {
			$error = "There was a problem with the submission. Please try again.";
		}
		*/		
	}
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
	<title></title>  
</head>
<body>
	<div id="registerpagecell">
		<div id="registerpageheaderorganiser">
		Create Your Organiser Profile 
		</div>
		<div id="registerform">
			<form id="form_id" name="form_id" class="appnitro" method="post" action="">
				<?php if(isset($error)){ echo "<span style=\"color:#ff0000;\">".$error."</span><br /><br />";}?>
				<div id="forminputcell">
					<div id="forminputleft">
						<label class="description" for="element_3">Your Job Role:</label>
					</div>
					<div id="forminputright">
						<select class="element select medium" name="category" id="category" > 
							<option value="" selected="selected">Venue:</option>
							<option value="Event Manager" >Event Manager</option>
							<option value="Event Managent Courses" >Event Managent Courses</option>
							<option value="Event Management Software" >Event Management Software</option>
							<option value="Entertainment Staff" >Entertainment Staff</option>
						</select> 			
					</div> 				
				</div> 	
				<input type="submit" value="Submit" />
			</form>				
		</div> 				
	</div> 
</body>
</html>