This is the error I get:
Parse error: parse error, unexpected $ in /home/gardensm/public_html/create.php on line 232
Line 232 is the last line of the page. I know the problem has something to do with the function maincontent($id) because when I remove it, the site works fine.
The evil function:
Sorry it is a bit much...Any help will be much appreciated.
Parse error: parse error, unexpected $ in /home/gardensm/public_html/create.php on line 232
Line 232 is the last line of the page. I know the problem has something to do with the function maincontent($id) because when I remove it, the site works fine.
The evil function:
Code:
function maincontent($id){
switch($id){
case "0":
echo 'You do not have creator priveledges. Please contact you adminstrator for more information.';
break;
case "1":
echo <<<DAN
//HTML Start
<table width="519" height="300" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="519" height="52"><div align="center">
<table width="121" height="52" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="49" height="52"><img src="old/images/icons/create.jpg" width="49" height="52"></td>
<td width="72"><font color="9999FF" size="6" face="Verdana, Arial, Helvetica, sans-serif">Create</font></td>
</tr>
</table>
<font face="Verdana, Arial, Helvetica, sans-serif"></font></div></td>
</tr>
<tr>
<td height="220"><div align="center">
<table width="500" border="0" cellspacing="0" cellpadding="0">
<font color="9999FF" size="3" face="Verdana, Arial, Helvetica, sans-serif"><tr>
<td width="166" height="100"><div align="center">
<p><a href="create.php?id=news"><img src="images/icons/news.jpg" width="49" height="52" border="0"></a></p>
<p><a href="create.php?id=news">News</a></p>
</div></td>
<td width="166" height="100"><div align="center">
<p><a href="create.php?id=staff"><img src="images/icons/staff.jpg" width="49" height="52" border="0"></a></p>
<p><a href="create.php?id=staff">Staff</a></p>
</div></td>
<td width="166" height="100"><div align="center">
<p> </p>
</div></td>
</tr>
<tr>
<td width="166" height="100"><div align="center"></div></td>
<td width="166" height="100"><div align="center">
<p> </p>
</div></td>
<td width="166" height="100"><div align="center"></div></td>
</tr></font>
</table>
<font face="Verdana, Arial, Helvetica, sans-serif"></font></div></td>
</tr>
</table>
//HTML End
DAN;
break;
case "2":
echo <<<LAR
//HTML Start
<table width="519" height="300" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="519" height="52"><div align="center">
<table width="121" height="52" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="49" height="52"><img src="old/images/icons/create.jpg" width="49" height="52"></td>
<td width="72"><font color="9999FF" size="6" face="Verdana, Arial, Helvetica, sans-serif">Create</font></td>
</tr>
</table>
<font face="Verdana, Arial, Helvetica, sans-serif"></font></div></td>
</tr>
<tr>
<td height="220"><div align="center">
<table width="500" border="0" cellspacing="0" cellpadding="0">
<font color="9999FF" size="3" face="Verdana, Arial, Helvetica, sans-serif"><tr>
<td width="166" height="100"><div align="center">
<p><a href="create.php?id=news"><img src="images/icons/news.jpg" width="49" height="52" border="0"></a></p>
<p><a href="create.php?id=news">News</a></p>
</div></td>
<td width="166" height="100"><div align="center">
<p><a href="create.php?id=staff"><img src="images/icons/staff.jpg" width="49" height="52" border="0"></a></p>
<p><a href="create.php?id=staff">Staff</a></p>
</div></td>
<td width="166" height="100"><div align="center">
<p><a href="create.php?id=about"><img src="images/icons/about.jpg" width="49" height="52" border="0"></a></p>
<p><a href="create.php?id=about">About</a></p>
</div></td>
</tr>
<tr>
<td width="166" height="100"><div align="center"></div></td>
<td width="166" height="100"><div align="center">
<p><a href="create.php?id=links"><img src="images/icons/links.jpg" width="49" height="52" border="0"></a></p>
<p><a href="create.php?id=links">Links</a></p>
</div></td>
<td width="166" height="100"><div align="center"></div></td>
</tr></font>
</table>
<font face="Verdana, Arial, Helvetica, sans-serif"></font></div></td>
</tr>
</table>
//HTML End
LAR;
break;
default:
echo 'error in the id variable';
}//end switch
}//end function
Sorry it is a bit much...Any help will be much appreciated.