Page 1 of 1

parser problem

Posted: Thu May 08, 2003 1:51 am
by sky2070
i create this php file to connect to a table guestbook in a database name guestbook

<?php
mysql_connect("localhost", "", "");
mysql_select_db("guestbook");
$result = mysql_query("select * from guestbook") or
die ( mysql_error() );
echo mysql_result($result,0,0);
?>

the browse return this error message

Parse error: parse error, unexpected T_STRING in c:\inetpub\wwwroot\database.php on line 4

can anymore tell me what is T_STRING and how to solve this problem :roll:

Posted: Thu May 08, 2003 4:13 am
by twigletmac
I don't get a parse error when I run your code, did you copy and paste your current code or retype it? You'll generally get a T_STRING message when you've forgotten to close some quotes on a string somewhere and PHP comes up against another string (same if, for example, you've forgotten to escape double quotes in a double quoted string).


Mac