Looks to me like you are trying to echo with " and ' without using the \ before it.
You also forgot the slash in closing the <tr> tag at the end.
Try:
echo "<table class=\'data\' border=\'0\' cellspacing=\'2\'>
<tr>
<td class=\'id\'>".$row['id']."</td>
<td class=\'whotd\'>".$row['who']."</td>
<td class=\'titletd\'>".$row['title']."</td>
<td class=\'messagetd\'>".$row['message']."</td>
<td class=\'emailtd\'>".$row['email']."</td>
<td class=\'datesent\'>".$row['date']."</td>
<td class=\'timetd\'>".$row['time']."</td>
</tr>
</table>";
You could also pull out of PHP for your table and go back to html:
<table class="data" border="0" cellspacing="2">
<tr>
<td class="id">ID</td>
<td class="whotd">Name</td>
<td class="titletd">Title</td>
<td class="messagetd">Message</td>
<td class="emailtd">Email</td>
<td class="datesent">Date sent</td>
<td class="timetd">Time sent</td>
</tr>
</table>
<?php
mysql_connect("localhost","root","") or die(mysql_error());
mysql_select_db("testsite") or die(mysql_error());
$q = "SELECT * FROM info ORDER BY 'ID' ";
$result = mysql_query($q) or die(mysql_error());
while ($row = mysql_fetch_array($result)){
?>
<table class='data' border='0' cellspacing='2'>
<tr>
<td class='id'><? echo $row['id']; ?></td>
<td class='whotd'><? echo $row['who']; ?></td>
<td class='titletd'><? echo $row['title']; ?></td>
<td class='messagetd'><? echo $row['message']; ?></td>
<td class='emailtd'><? echo $row['email']; ?></td>
<td class='datesent'><? echo $row['date']; ?></td>
<td class='timetd'><? echo $row['time']; ?></td>
<tr>
</table>
<?php
}
?>
Three last suggestions: Don't use common names like Date and Time and ID for variables and field names. Chance they might get mixed up. Give them unique names like: msgDate, msgTime, and msgID.
Second, I don't see any reason you are setting a class for each table column. If you want them to look alike and control them with CSS, name them one class. If you are not controlling them with CSS, then don't name a class at all.
Third, and this is just a personal preference, try using this for your connection:
$host='localhost';
$username='yourUsername';
$password='yourPassword';
$db_name='yourDBname';
$tbl_name='yourTblName';
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
$sql="SELECT * FROM $tbl_name ORDER BY msgID"; //msgID does not need to be isolated with " or '
$result=mysql_query($sql);
$count=mysql_num_rows($result);
Hope it helps and works.
Jeff