Valiadte select box in php

Hi,
I have a problem. I created a registration page for my site called register.html which then posts the detailds for processing to register.php but I get some serious erros and I do not know why. Here are the files:

register.html:
<?xml version=“1.0” encoding=“utf-8”?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=“http://www.w3.org/1999/xhtml”>

<head>
<meta http-equiv=“Content-Type” content=“text/html; charset=utf-8” />
<title>Welcome to ADesigns: Home</title>
<link href=“css/main.css” rel=“stylesheet” type=“text/css” />
</head>

<body>

<table id=“outerTable”>
<tr><td id=“logo”>
<div>
<img src=“./images/logo.png” width=“150” height=“55” alt=“company_logo” />
</div>
</td></tr>
<tr><td id =“nav”>
<div>
<a href=“home.html”>Home</a> |
<a href=“designers.html”>Participate</a> |
<a href=“aboutUs.html”>About ADesigns</a> |
<a href=“contact.php”>Contact Us</a>
</div>
</td></tr>
<tr><td id=“banner”> <! – page banner image –>
<img src=“images/home.jpg” width=“770” height=“” alt=“welcome to ADesigns”>
</td></tr>
<tr><td>
<table id=“contentTable”>
<tr>
<td id=“topLeft”>
<br />
<div id=“welcomeBox”>
<h1>Advertisments</h1>
<p>This section covers adverts from other companies</p>
</div> <! – mainContent –>
</td>
<td id=“topRight”>
<br />
<div id=“loginRegBox”>
<h1>Register</h1>
<form method=“post” action=“register.php”>

					&lt;fieldset&gt;
						&lt;legend&gt;Personal Information&lt;/legend&gt;
						&lt;div&gt;
							&lt;label for="fname"&gt;Firstname:&lt;/label&gt;
							&lt;input type="text" name="fname" id="fname" class="txt" /&gt;
						&lt;/div&gt;
						&lt;div&gt;
							&lt;label for="lname"&gt;Lastname:&lt;/label&gt;
							&lt;input type="text" name="lname" id="lname" class="txt" /&gt;
						&lt;/div&gt;
						&lt;div&gt;
							&lt;label for="email"&gt;Email:&lt;/label&gt;
							&lt;input type="text" name="email" id="email" class="txt" /&gt;
						&lt;/div&gt;
					&lt;/fieldset&gt;
					
					&lt;fieldset&gt;
						&lt;legend&gt;Account Informaion&lt;/legend&gt;
						&lt;div&gt;
							&lt;label for="category"&gt;Category:&lt;/label&gt;
							&lt;select name="category"&gt;
								&lt;option value=""&gt;Please select a category&lt;/option&gt;
								&lt;option value="M"&gt;Men&lt;/option&gt;
								&lt;option value="W"&gt;Women&lt;/option&gt;
								&lt;option value="K"&gt;Kids&lt;/option&gt;
								&lt;option value="U"&gt;Unisex&lt;/option&gt;
								&lt;option value="A"&gt;Accessories&lt;/option&gt;
								&lt;option value="S"&gt;Shoes&lt;/option&gt;
							&lt;/select&gt;
						&lt;/div&gt;
						&lt;div&gt;
							&lt;label for="membership"&gt;What is your Membership Level?&lt;/label&gt;
							&lt;input type="radio" name="membership" id="designer" value="designer" /&gt;Designer
							&lt;input type="radio" name="membership" id="visitor" value="visitor" /&gt;Visitor
						&lt;/div&gt;
						&lt;div&gt;
							&lt;label for="location"&gt;Location:&lt;/label&gt;
							&lt;input type="text" name="location" id="location" class="txt" /&gt;
						&lt;/div&gt;
					&lt;/fieldset&gt;
					&lt;fieldset&gt;
						&lt;legend&gt;Login Details&lt;/legend&gt;
						&lt;div&gt;
							&lt;label for="username"&gt;Username:&lt;/label&gt;
							&lt;input type="text" name="username" id="username" class="txt" /&gt;
						&lt;/div&gt;
						&lt;div&gt;
							&lt;label for="password"&gt;Password:&lt;/label&gt;
							&lt;input type="password" name="password" id="password" class="txt" /&gt;
						&lt;/div&gt;
						&lt;div&gt;
							&lt;label for="confirmPassword"&gt;Confirm Password:&lt;/label&gt;
							&lt;input type="password" name="confirmPassword" id="confirmPassword" class="txt" /&gt;
						&lt;/div&gt;
					&lt;/fieldset&gt;
						&lt;div&gt;
							&lt;input type="submit" name="btnSubmit" id="btnSubmit" value="Submit" /&gt;
						&lt;/div&gt;	
				&lt;/form&gt;
				&lt;/div&gt; &lt;! -- mainContentRight --&gt;
		&lt;/tr&gt;
		
	&lt;/table&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td  id="footer"&gt;&lt;div id="footerLastRow"&gt;&lt;p&gt;&copy; ADesigns  &nbsp;&nbsp; &lt;a href="#"&gt;Privacy Policy&lt;/a&gt; | &lt;a href="#"&gt;Terms and Conditions&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

</table>

</body>
</html>

register.php:
<?php
# This is for the registration page

	$page_title = 'Welcome to ADesigns: Registration';
	
	include ('includes/header.html');
	
	// Check if the form has been submitted:

	if (isset($_POST['submitted'])) 
	{
		$errors = array(); // Initialize an error array.

		// Check for a first name:
		
		if (empty($_POST['fname'])) 
		{
			$errors[] = 'You forgot to enter your first name.';
		} 
		else 
		{
			$fn = trim($_POST['fname']);
		}

		// Check for a last name:
		if (empty($_POST['lname'])) 
		{
			$errors[] = 'You forgot to enter your last name.';
		} 
		else 
		{
			$ln = trim($_POST['lname']);
		}

		// Check for an email address:
		if (empty($_POST['email'])) 
		{
			$errors[] = 'You forgot to enter your email address.';
		} 
		else 
		{
			$e = trim($_POST['email']);
		}

		// Check for a category:
		if(isset($_REQUEST['category'])
		{
			$category = $_REQUEST['category'];
			
			if ($category = 'M') 
			{
				$category = trim($_POST['Men'];
			} 
			else if ($category = 'W')
			{
				$category = trim($_POST['Women'];
			}
			else if ($category = 'K')
			{
				$category = trim($_POST['Kids'];
			}
			else if ($category = 'U')
			{
				$category = trim($_POST['Unisex'];
			}
			else if ($category = 'A')
			{
				$category = trim($_POST['Accessories'];
			}
			else if ($category = 'S')
			{
				$category = trim($_POST['Shoes'];
			}
			else if ($category = '')
			{
				$errors[] = "You forgot to select a category.";
			}
		}
		
		else
		{
			$errors[] = "You forgot to select a membership.";
		}
			
		
		// Check for  membership type:
		
		if (isset($_REQUEST['membership'])) 
		{
			$membership = $_REQUEST['membership'];
			
			if ($membership = 'designer')
			{
				$membership = trim($_POST['membership']);
			}
			else if ($membership = 'visitor')
			{
				$membership = trim($_POST['membership']);
			}
		} 
		else 
		{
			$errors[] = "You forgot to select a membership.";
		}
		
		
		// Check for a loaction:
		if (empty($_POST['location'])) 
		{
			$errors[] = 'You forgot to enter your location.';
		} 
		else 
		{
			$l = trim($_POST['location']);
		}
		
		
		

		// Check for an username:
		if (empty($_POST['username'])) 
		{
			$errors[] = 'You forgot to enter your username.';
		} 
		else 
		{
			$u = trim($_POST['username']);
		}
		
		// Check for a password and match against the confirmed password:

		if (!empty($_POST['pass1'])) 
		{
			if ($_POST['pass1'] != $_POST['pass2']) 
			{
				$errors[] = 'Your password did not match the confirmed password.';
			} 
			else 
			{
				$p = trim($_POST['pass1']);
			}
		} 
		else 
		{
			$errors[] = 'You forgot to enter your password.';
		}

		if (empty($errors)) 
		{ 
			// If everything's OK.
			// Register the user in the database...
	
			require_once ('dbc.php'); 	// Connect to the db.
	
			// Make the query:
			// $q - stands for $query
			// $r - stands for $result
			$q = "INSERT INTO user (fname, lname, email, category, membership, loaction, username, password reg_date ) VALUES ('$fn', '$ln', '$e', '$category', '$membership', '$l', '$u', SHA1('$p'),  NOW() )";		
			$r = @mysql_query ($q); // Run the query.
	
			if ($r) 
			{ 
				// If it ran OK.
				// Print a message:
		
				echo '&lt;h1&gt;Thank you!&lt;/h1&gt;
				&lt;p&gt;You are now registered. Please  &lt;a href="login.php"&gt;login&lt;/a&gt;&lt;/p&gt;';	
			} 
			else 
			{ 
				// If it did not run OK.
				// Public message:
		
				echo '&lt;h1&gt;System Error&lt;/h1&gt;
				&lt;p class="error"&gt;You could not be registered due to a system error. We apologize for any inconvenience.&lt;/p&gt;'; 
		
				// Debugging message:
				echo '&lt;p&gt;' . mysql_error($dbc) . '&lt;br /&gt;&lt;br /&gt;Query: ' . $q . '&lt;/p&gt;';
			
			} // End of if ($r) IF.
	
			mysql_close($dbc); // Close the database connection.
	
			// Include the footer and quit the script:
			include ('includes/footer.html'); 
			exit();
	
		} 
		else 
		{ 
			// Report the errors.

			echo '&lt;h1&gt;Error!&lt;/h1&gt;
			&lt;p class="error"&gt;The following error(s) occurred:&lt;br /&gt;';
			foreach ($errors as $msg) 
			{ 
				// Print each error.
				echo " - $msg&lt;br /&gt;\

";
}

			echo '&lt;/p&gt;&lt;p&gt;Please try again.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;';
	
		} // End of if (empty($errors)) IF.


	} // End of the main Submit conditional.

?>

<?php
include(‘includes/footer.html’);
?>

I get some fuuny errors like this:

Thank you!

You are now registered. Please login
'; } else { // If it did not run OK. // Public message: echo ’
System Error

You could not be registered due to a system error. We apologize for any inconvenience.
'; // Debugging message: echo ’

’ . mysql_error($dbc) . ’

Query: ’ . $q . ’
'; } // End of if ($r) IF. mysql_close($dbc); // Close the database connection. // Include the footer and quit the script: include (‘includes/footer.html’); exit(); } else { // Report the errors. echo ’
Error!

The following error(s) occurred:
'; foreach ($errors as $msg) { // Print each error. echo " - $msg

"; } echo ’

Please try again.

'; } // End of if (empty($errors)) IF. } // End of the main Submit conditional. ?>

Please can anyone help me out here?