Hi everyone, I'm new to PHP and have a prob with what should be simple script. I keep getting the following error:
Parse error: parse error, unexpected T_STRING in C:\web\viewguestbook.php on line 7
It seems to be this line:
$result = mysql_query(“select * from guestbook”);
I've checked the db and the table and fields exist.
Full Script:
<?
$db = mysql_connect(“localhost”,“root”,”my_password”);
mysql_select_db(“guestbook”,$db);
?>
<h2>View My Guest Book!!</h2>
<?php
$result = mysql_query(“select * from guestbook”);
while ($row = mysql_fetch_array($result))
{
echo “<b>Name:</b>”;
echo $row [“name ”];
echo “<br>\n ”;
echo “<b>Location:</b>”;
echo $row [“location ”];
echo “<br>\n ”;
echo “<b>Email:</b>”;
echo $row [“email ”];
echo “<br>\n ”;
echo “<b>URL:</b>”;
echo $row [“url ”];
echo “<br>\n ”;
echo “<b>Comments:</b>”;
echo $row [“comments ”];
echo “<br>\n ”;
echo “<br>\n ”;
echo “<br>\n ”;
}
mysql_free_result($result);
?>
<h2><a href=”sign.php ”>Sign My Guest Book!!</a></h2>
Thanks for any help