Why does the server not recognise this as PHP code?
<p>When loaded on to the server <a href="http://letsplays.uni.me/addchannel.html" rel="nofollow">http://letsplays.uni.me/addchannel.html</a> the code appears from this part as that is where syntax highlighting stops!
$value) { if (empty($value) &amp;&amp; in_array($key, $required_fields) === true) { $errors[] = 'Fields marked with * are required'; break 1; } } } ?></p>

<p>Seems rather abrupt and there doesn't appear to be any problems!</p>

<pre><code>&lt;?php
if(empty($_Post) === false) {
    $required_fields = array('email', 'password', 'repeatpassword', 'channelurl', 'chanelname', 'embedd1', 'keywords');
    foreach($_POST as $key=&gt;$value) {
        if (empty($value) &amp;&amp; in_array($key, $required_fields) === true) {
            $errors[] = 'Fields marked with * are required';
            break 1;
        }
    }
}
?&gt;






&lt;?php require_once('Connections/connecttotable.php'); ?&gt;
&lt;?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION &lt; 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_insert"])) &amp;&amp; ($_POST["MM_insert"] == "form1")) {
  $insertSQL = sprintf("INSERT INTO Userchannel (chanelID, firstname, lastname, email, password, channelurl, chanelname, `description`, embedd1, game1, Embedd2, game2) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
                       GetSQLValueString($_POST['chanelID'], "int"),
                       GetSQLValueString($_POST['firstname'], "text"),
                       GetSQLValueString($_POST['lastname'], "text"),
                       GetSQLValueString($_POST['email'], "text"),
                       GetSQLValueString($_POST['password'], "text"),
                       GetSQLValueString($_POST['channelurl'], "text"),
                       GetSQLValueString($_POST['chanelname'], "text"),
                       GetSQLValueString($_POST['description'], "text"),
                       GetSQLValueString($_POST['embedd1'], "text"),
                       GetSQLValueString($_POST['game1'], "text"),
                       GetSQLValueString($_POST['Embedd2'], "text"),
                       GetSQLValueString($_POST['game2'], "text"));

  mysql_select_db($database_connecttotable, $connecttotable);
  $Result1 = mysql_query($insertSQL, $connecttotable) or die(mysql_error());

  $insertGoTo = "mychanel.php";
  if (isset($_SERVER['QUERY_STRING'])) {
    $insertGoTo .= (strpos($insertGoTo, '?')) ? "&amp;" : "?";
    $insertGoTo .= $_SERVER['QUERY_STRING'];
  }
  header(sprintf("Location: %s", $insertGoTo));
}

mysql_select_db($database_connecttotable, $connecttotable);
$query_Recordset1 = "SELECT * FROM Userchannel";
$Recordset1 = mysql_query($query_Recordset1, $connecttotable) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?&gt;
&lt;style type="text/css"&gt;
#wrapper .pretag #main h1 {
    text-align: center;
}
&lt;/style&gt;
&lt;!-- InstanceBegin template="/Templates/header.dwt" codeOutsideHTMLIsLocked="false" --&gt;
        &lt;style type="text/css"&gt;
        .links {
    font-size: 24px;
    color: #FFF;
}
        #main {
    height: auto;
    width: 1024px;
}
        #main {
    height: auto;
    width: 1024px;
}
        #footer {
    height: auto;
    width: 1024px;
}
        #navbar2 {
    height: auto;
    width: 512px;
    float: left;
}
        #advertisement {
    background-color: #039;
    height: 150px;
    width: 512px;
    float: left;
}
        &lt;/style&gt;
&lt;!-- InstanceBeginEditable name="head" --&gt;
&lt;!-- InstanceEndEditable --&gt;
&lt;script type="text/javascript"&gt;
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&amp;&amp;i&lt;a.length&amp;&amp;(x=a[i])&amp;&amp;x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i&lt;a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))&gt;0&amp;&amp;parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&amp;&amp;d.all) x=d.all[n]; for (i=0;!x&amp;&amp;i&lt;d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&amp;&amp;d.layers&amp;&amp;i&lt;d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x &amp;&amp; d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i&lt;(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
&lt;body onLoad="MM_preloadImages('images/homerollover.jpg','images/ChannelSearchrlo.jpg','images/Channelcreaterlo.jpg','images/Newsrlo.jpg','images/about.jpg','images/Aboutrlo.jpg')"&gt;
&lt;!-- InstanceBeginEditable name="mainarea" --&gt;
&lt;div id="wrapper"&gt;
  &lt;style type="text/css"&gt;
#wrapper {
    height: auto;
    width: 1024px;
    margin-right: auto;
    margin-left: auto;
}
#header {
    background-image: url(images/heading2.jpg);
    height: 200px;
    width: 1024px;
}
  &lt;/style&gt;
  &lt;div id="header"&gt;
    &lt;pre&gt;
    &lt;p class="pretag"&gt;&lt;span class="links"&gt;&lt;/span&gt;&lt;/p&gt;
    &lt;pre class="pretag"&gt;&lt;span class="links"&gt;           

               &lt;a href="http://letsplays.uni.me/" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image1','','images/homerollover.jpg',1)"&gt;&lt;img src="images/Home.jpg" alt="Go Home" name="Image1" width="150" height="30" border="0"&gt;&lt;/a&gt;&lt;a href="http://letsplays.uni.me/" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('home','','images/homerollover.jpg',1)"&gt;&lt;/a&gt;&lt;/span&gt;  &lt;a href="ChannelSearch.php.txt" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Channelsearch','','images/ChannelSearchrlo.jpg',1)"&gt;&lt;img src="images/channelsearch.jpg" alt="Channel Search" name="Channelsearch" width="150" height="30" border="0"&gt;&lt;/a&gt;  &lt;a href="CreateChannel.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Create Channel','','images/Channelcreaterlo.jpg',1)"&gt;&lt;img src="images/channeladd.jpg" alt="Create Channel" name="Create Channel" width="150" height="30" border="0"&gt;&lt;/a&gt;  &lt;a href="ign.com" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('News','','images/Newsrlo.jpg',1)"&gt;&lt;img src="images/News.jpg" alt="News" name="News" width="150" height="30" border="0"&gt;&lt;/a&gt; &lt;a href="About.html.txt" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('About','','images/Aboutrlo.jpg',1)"&gt;&lt;img src="images/about.jpg" alt="About this page" name="About" width="150" height="30" border="0"&gt;&lt;/a&gt;&lt;a href="About.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('About ','','images/about.jpg',1)"&gt;&lt;/a&gt;&lt;/pre&gt;
  &lt;/div&gt;
  &lt;span class="pretag"&gt;
  &lt;div id="main"&gt;&lt;h1&gt;Add Your Channel&lt;/h1&gt;
  &lt;?php
&lt;?php
if(empty($_POS) === false) {
    $required_fields = array('email', 'password', 'repeatpassword', 'channelurl', 'chanelname', 'embedd1', 'keywords')
    foreach($_POST as $key=&gt;$value) {
        if (empty($value) &amp;&amp; in_array($key, $required_fields) === true) {
            $errors[] = 'Fields marked with * are required';
            break 1;
        }
    }
}
print_r($errors);
?&gt;



  &lt;/h1&gt;
    &lt;p&gt;&amp;nbsp;&lt;/p&gt;
    &lt;form method="post" name="form1" action="&lt;?php echo $editFormAction; ?&gt;"&gt;
      &lt;table align="center"&gt;
        &lt;tr valign="baseline"&gt;
          &lt;td nowrap align="right"&gt;First name:&lt;/td&gt;
          &lt;td&gt;&lt;input type="text" name="firstname" value="" size="32"&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr valign="baseline"&gt;
          &lt;td nowrap align="right"&gt;Last name:&lt;/td&gt;
          &lt;td&gt;&lt;input type="text" name="lastname" value="" size="32"&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr valign="baseline"&gt;
          &lt;td nowrap align="right"&gt;Email:*&lt;/td&gt;
          &lt;td&gt;&lt;input type="text" name="email" value="" size="32"&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr valign="baseline"&gt;
          &lt;td nowrap align="right"&gt;Password:*&lt;/td&gt;
          &lt;td&gt;&lt;input type="password" name="password" value="" size="32"&gt;&lt;/td&gt;
        &lt;/tr&gt;
         &lt;tr valign="baseline"&gt;
          &lt;td nowrap align="right"&gt;Repeat Password:*&lt;/td&gt;
          &lt;td&gt;&lt;input type="password" name="repeatpassword" value="" size="32"&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr valign="baseline"&gt;
          &lt;td nowrap align="right" valign="top"&gt;Channel url:*&lt;/td&gt;
          &lt;td&gt;&lt;textarea name="channelurl" cols="50" rows="1"&gt;&lt;/textarea&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr valign="baseline"&gt;
          &lt;td nowrap align="right"&gt;Channel name:*&lt;/td&gt;
          &lt;td&gt;&lt;input type="text" name="chanelname" value="" size="32"&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr valign="baseline"&gt;
          &lt;td nowrap align="right"&gt;Description:&lt;/td&gt;
          &lt;td&gt;&lt;textarea name="description" cols="32" rows="6"&gt;&lt;/textarea&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr valign="baseline"&gt;
          &lt;td nowrap align="right"&gt;Video 1:* &lt;/td&gt;
          &lt;td&gt;&lt;input type="text" name="embedd1" value="" size="32"&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr valign="baseline"&gt;
          &lt;td nowrap align="right"&gt;What game is it?&lt;/td&gt;
          &lt;td&gt;&lt;input type="text" name="game1" value="" size="32"&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr valign="baseline"&gt;
          &lt;td nowrap align="right"&gt;Video 2:&lt;/td&gt;
          &lt;td&gt;&lt;input type="text" name="Embedd2" value="" size="32"&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr valign="baseline"&gt;
          &lt;td nowrap align="right"&gt;What game is it?&lt;/td&gt;
          &lt;td&gt;&lt;input type="text" name="game2" value="" size="32"&gt;&lt;/td&gt;
          &lt;/tr&gt;
         &lt;tr valign="baseline"&gt;
          &lt;td nowrap align="right"&gt;Keywords to describe and find your channel*&lt;/td&gt;
          &lt;td&gt;&lt;input type="text" name="keywords" value="" size="32"&gt;&lt;/td&gt;  
        &lt;/tr&gt;
        &lt;tr valign="baseline"&gt;
          &lt;td nowrap align="right"&gt;&amp;nbsp;&lt;/td&gt;
          &lt;td&gt;&lt;input type="submit" value="Channel Create"&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
      &lt;input type="hidden" name="chanelID" value=""&gt;
      &lt;input type="hidden" name="MM_insert" value="form1"&gt;
    &lt;/form&gt;
    &lt;p&gt;&amp;nbsp;&lt;/p&gt;
  &lt;/div&gt;
  &lt;/span&gt;
  &lt;div id="footer"&gt;
    &lt;div id="navbar2"&gt;
      &lt;ul&gt;
        &lt;li&gt;
          &lt;url src="http://letsplays.uni.me"&gt;
          Home&lt;/li&gt;
        &lt;li&gt;
          &lt;url src="http://letsplays.uni.me/addchannel"&gt;
          Cnannel Add&lt;/li&gt;
        &lt;li&gt;
          &lt;url src="http://letsplays.uni.me/channelsearch"&gt;
          Channel Search&lt;/li&gt;
        &lt;li&gt;
          &lt;url src="http://letsplays.uni.me/news"&gt;
          News&lt;/li&gt;
        &lt;li&gt;
          &lt;url src="http://letsplays.uni.me/about"&gt;
          About and Contact&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/div&gt;
    &lt;div id="advertisement"&gt;&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;!-- InstanceEndEditable --&gt;
&lt;/body&gt;
&lt;!-- InstanceEnd --&gt;
&lt;?php
mysql_free_result($Recordset1);
?&gt;
</code></pre>
