Include(); function error

Basically I have a file that is plain php and I use the includes function the add the html so that all messages from the php file will be displayed in the html form. The scripts below are the files:

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:
		
		$categoryValues = array('Men', 'Women', 'Kids', 'Unisex', 'Accessories', 'Shoes');

		$category = ''; //start empty

		//do the check here:

		if(isset($_REQUEST['category']))
		{
				if (in_array($_POST['category'], $categoryValues)) {
					$category = trim($_POST['category'] );
				}

				else{
					$errors[] = "You forgot to select a category.";
				}
		}
		
		
		else
		{
			$errors[] = "You forgot to select a category.";
		}
			
		
		// Check for  membership type:
		
		if (isset($_POST['membership'])) 
		{
			$membership = $_POST['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 ('mysql_connect.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, location, 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.html"&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’);
?>

header.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><?php echo $page_title; ?></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.html”>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”>
<div id=“welcomeBox”>
<h3>Welcome!!</h3>
<p>This is a final year project of mine that enables young aspiring designers of
any cateegory: cloths, bags, mens wear, womens wear and a host of other types.
You are free to look aroud and comment on designs but should you need more information, you have to register but
not to worry. It is free!!</p>
<p><a href=“enter.html”>Enter/Browse</a></p>
</div> <! – mainContent –>
</td>
<td id=“topRight”>
<div id=“loginRegBox”>
<h3>Join Us</h3>
<p>If you are thinking of showing your designs or connecting with like minded designers,
this is where you should be. Our site hosts a range of youngy asipring designers seeking
to show thier work wide audience. So please what are you waiting for join us now</p>
<p><a href=“login.html”>Login</a> | <a href=“register.html”>Register</a></p>

				&lt;/div&gt; &lt;! -- mainContentRight --&gt;
		&lt;/tr&gt;
		&lt;tr&gt;&lt;br /&gt;&lt;/tr&gt;&lt;tr&gt;&lt;br /&gt;&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td id="bottomLeft"&gt;
				&lt;div id="newDesigners"&gt;
					&lt;br /&gt;
					&lt;h3&gt;New Designers&lt;/h3&gt;
					&lt;p&gt;This will show designers that are just registered into the DB.&lt;/p&gt;
					&lt;ul&gt;
						&lt;li&gt;&lt;a href=""&gt;Designer A&lt;/a&gt;&lt;/li&gt;
						&lt;li&gt;&lt;a href=""&gt;Designer B&lt;/a&gt;&lt;/li&gt;
						&lt;li&gt;&lt;a href=""&gt;Designer C&lt;/a&gt;&lt;/li&gt;
						&lt;li&gt;&lt;a href=""&gt;Designer D&lt;/a&gt;&lt;/li&gt;
						&lt;li&gt;&lt;a href=""&gt;Designer E&lt;/a&gt;&lt;/li&gt;
						&lt;li&gt;&lt;a href=""&gt;Designer F&lt;/a&gt;&lt;/li&gt;
					&lt;/ul&gt;
				&lt;/div&gt; &lt;! -- mainContentBottom --&gt;
			&lt;/td&gt;
			&lt;td id="bottomRight"&gt;
				&lt;div id="weeksDesigners"&gt;
					&lt;br /&gt;
					&lt;h3&gt;Designers of the Week&lt;/h3&gt;
					&lt;p&gt;This should show a list of all designers for the week. Preferably, those that 
					have registered for that week.&lt;/p&gt;
				&lt;/div&gt; &lt;! -- mainContentBottomRight --&gt;
		&lt;/tr&gt;
	&lt;/table&gt;
&lt;/td&gt;&lt;/tr&gt;

</table>

the footer is:

<div id=“footerLastRow”><p>© ADesigns    <a href=“#”>Privacy Policy</a> | <a href=“#”>Terms and Conditions</a></p></div>

</body>
</html>

Anyone out there please help becuase I get the following error:

Parse error: syntax error, unexpected T_STRING in /Library/WebServer/Documents/myQmProj/includes/header.html on line 1

Help please

Format your posts with bbcode

a php opening tag is <?php, but there’s also an optional shorthand version which is just <?
The first line in your file has <? in it, and php gets tripped up on it because it thinks you want it to interpret the following characters as php code.

You could do this to get around it.


<?php
echo '<?xml version="1.0" encoding="utf-8"?>';
?>

But, your file is not xml, so you might as well just remove the xml declaration altogether.