Many thanks for your response. I'm sorry for not including the code to start with. I've scoured the page for un ";ed" $'s. In fact the code doesn't have any php beyond ~line 288 (the error said 310)
I'll include the code from the first php mention onwards.
Firstly, let me apologise for the shoddy state of my coding. I only hope the colour of the PHP highlighting helps to make sense of it. I'm very new to PHP etc and appreciate any guidance.
Right, here's the "code":
<?php
$dbh = mysql_pconnect ("host", "user", "pass") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("ironmong_ironmongernews");
$dbh = mysql_query("SELECT * FROM news order by date desc LIMIT 5")
or die("Could not execute SQL query");
while ($row = mysql_fetch_array($dbh))
{
?>
<td width="7%" bgcolor="#C0E0FF">
<div align="center"><a href="news.php?story=<? echo $row["id"]; ?>"><img src="images/interface/topic_move.gif" width="19" height="18" border="0"></a></div>
</td>
<td width="66%" bgcolor="#D8E9F3" style="cursor:hand" onMouseOver="this.style.backgroundColor='#C0E0FF'" onMouseOut="this.style.backgroundColor=''" onClick="window.location.href='news.php?story=<? echo $row["id"]; ?>'" class="bodyText">
<? echo $row["headline"]; ?>
<a href="news.php?story=<? echo $row["id"]; ?>">more >></a></td>
<td width="15%" class="bodyText" bgcolor="#D8E9F3" align="center" valign="top" >
<table width="100%" border="0" height="100%" cellpadding="0" cellspacing="0"><? $id=$row["id"]; ?>
<? $dbd = mysql_query("SELECT news.userid_news, members.* FROM news, members WHERE news.id=$id AND news.userid_news = members.id ")
or die("Could not execute SQL query");
#loop through all records
while ($rowa = mysql_fetch_array($dbd))
{
?>
<tr>
<td align="center" valign="middle" height="20" bgcolor="#D8E9F3" style="cursor:hand" onMouseOver="this.style.backgroundColor='#C0E0FF'" onMouseOut="this.style.backgroundColor=''" onClick="window.location.href='profile.php?pro_id=<? echo $row["userid_news"]; ?>'" class="bodyText">
<a href="profile.php?pro_id=<? echo $row["userid_news"]; ?>">
<? echo $rowa["first_name"]; ?>
<? echo $rowa["surname"]; ?>
</a>
</td>
</tr><? } ?>
</table>
</td>
<td width="12%" bgcolor="#C0E0FF" class="bodyText" align="center" valign="middle">
<?php
$datetime = $row["date"];
$year = substr($datetime,0,4);
$mon = substr($datetime,4,2);
$day = substr($datetime,6,2);
$hour = substr($datetime,8,2);
$min = substr($datetime,10,2);
$sec = substr($datetime,12,2);
$orgdate = date("D d/m/y ",mktime($hour,$min,$sec,$mon,$day,$year));
?>
<? echo $orgdate; ?>
</td>
</tr>
<? } ?>
<tr>
<td background="images/interface/cellpic1.gif" colspan="4"> </td>
</tr>
</table>
<a href="all_news.php"><img src="images/interface/more_news.gif" width="82" height="25" vspace="5" border="0"></a><br>
<table width="100%" border="0" cellspacing="1" cellpadding="2" class="table_ridge">
<tr>
<td width="7%" class="subText" height="28" background="images/interface/cellpic3.gif">
<div align="center" class="subText"></div>
</td>
<td width="66%" class="subText" height="28" background="images/interface/cellpic3.gif">
<div align="center">Club Notices</div>
</td>
<td class="subText" height="28" width="15%" background="images/interface/cellpic3.gif">
<div align="center">Author</div>
</td>
<td class="subText" height="28" width="12%" background="images/interface/cellpic3.gif">
<div align="center">Date</div>
</td>
</tr>
<tr>
<?php
$dbh = mysql_pconnect ("host", "user", "pass") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("ironmong_ironmongernews");
$dbh = mysql_query("SELECT * FROM announcements order by date desc LIMIT 3")
or die("Could not execute SQL query");
while ($row = mysql_fetch_array($dbh))
{
?>
<td width="7%" bgcolor="#C0E0FF">
<div align="center"> <? $id=$row["id"]; ?>
<a href="announcements.php?story=<? echo $row["id"]; ?>"><img src="<? switch (($row["priority"]))
{
case red : echo("images/interface/red.gif"); break;
case yellow : echo("images/interface/yellow.gif"); break;
case green : echo("images/interface/green.gif"); break;
default : echo("");
}
?>" border="0"></a></div>
</td>
<td width="66%" bgcolor="#D8E9F3" style="cursor:hand" onMouseOver="this.style.backgroundColor='#C0E0FF'" onMouseOut="this.style.backgroundColor=''" onClick="window.location.href='announcements.php?story=<? echo $row["id"]; ?>'" class="bodyText">
<? echo $row["subject"]; ?>
<a href="announcements.php?story=<? echo $row["id"]; ?>">more >></a></td>
<td width="15%" bgcolor="#D8E9F3" class="bodyText" align="center" >
<a href="mailto:<? echo $row["author"]; ?>"> </a>
<table width="100%" border="0" height="100%" cellpadding="0" cellspacing="0">
<?
$dbc = mysql_query("SELECT announcements.userid_anno, members.* FROM announcements, members WHERE announcements.id=$id AND announcements.userid_anno = members.id ")
or die("Could not execute SQL query");
while ($rowb = mysql_fetch_array($dbc))
{
?>
<tr>
<td align="center" valign="middle" height="20" bgcolor="#D8E9F3" style="cursor:hand" onMouseOver="this.style.backgroundColor='#C0E0FF'" onMouseOut="this.style.backgroundColor=''" onClick="window.location.href='profile.php?pro_id=<? echo $row["userid_anno"]; ?>'" class="bodyText">
<a href="profile.php?pro_id=<? echo $row["userid_anno"]; ?>">
<? echo $rowb["first_name"]; ?>
<? echo $rowb["surname"]; ?>
</a>
<? } ?>
</td>
</tr>
</table>
</td>
<td width="12%" bgcolor="#C0E0FF" class="bodyText" valign="middle" align="center">
<?php
$datetime = $row["date"];
$year = substr($datetime,0,4);
$mon = substr($datetime,4,2);
$day = substr($datetime,6,2);
$hour = substr($datetime,8,2);
$min = substr($datetime,10,2);
$sec = substr($datetime,12,2);
$orgdate = date("D d/m/y ",mktime($hour,$min,$sec,$mon,$day,$year));
?>
<? echo $orgdate; ?>
</td>
</tr>
<? } ?>
<tr>
<td background="images/interface/cellpic1.gif" colspan="4"> </td>
</tr>
</table>
<div align="left"> <a href="all_announcements.php"><img src="images/interface/more_anno.gif" width="82" height="25" vspace="5" border="0"></a>
<p align="center"><span class="bodyText">©2003 <a href="http://www.greeno76.com/">Jason
Green </a></span></p>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p> </p>
</body>
You hate it, don't you?
I still find it strange that it parses error free on the existing server. Is the newer version of PHP less sensitive to dodgy coding?
Well, many thanks for any input if you've very kindly spent the time browsing it
Jason