- Code: Select all
<?
//display the stats in a table
//connect to the DB
$Connect=mysql_connect(localhost,***,***) or die("Sorry, unable to connect to DataBase(1)");
//select DB
$DB=mysql_select_db(database,$connect);
//setting the query in a variable, the query, in this case it SELECTS teh table and outputs int a HTML table
$query="select * FROM adamgb";
//running the actual query
$result=mysql_query($query) or die("Sorry, unable to query DataBase(2)");
//rows return?
$returned=mysql_num_rows($result);
echo("<b>Straight to the Point</B> Guestbook")
//fetch results and display in HTML table
echo("<b>$returned results</B>");
//putting the results into a Array
while($row=mysql_fetch_array($result))
//looping thru the array and outputing the results into a table
{
echo("<p>&</p>")
echo("<table border=\"0\" celpadding=\"5\" cellspacing=\"5\">")
echo("<tr>")
echo("<td width="81" bgcolor=#C6EFF7 >&.$row[&name&].&</td>")
echo("<td width="641" bgcolor=#C6EFF7><div align="left">&.row[Date&].&</div></td>")
echo("</tr>")
echo("<tr>");
echo("<td BGCOLOR=#EOEOEO><p>&.$row[&email&].&</p><p>&.$row[&website&].&</p></td>")
echo("<td bgcolor=#EOEOEO>&.$row[Comments]&.&</td>")
echo("</tr>")
}
echo("</table><p>"); </p>
//cleaing up the memory
mysql_free_result($result); </p>
?>
but im getting a parse error on line 21 it is telling me it expects:
`','' or `';'' but i cant see where or why it would go in?! can anywould help me!?


