RE: [PHP] syntax error, unexpected T_STRING
| From: | Jim Moseby | Date: | Mon, 18 Jul 2005 18:25:33 +0000 |
| Subject: | RE: [PHP] syntax error, unexpected T_STRING | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-218890@lists.php.net to get a copy of this message | ||
>
> I am trying to connect to a datbase:
>
> "
> mysql_select_db ('database')
> or die ("couldnt connect to databse")
> "
> What is wrong here?
> This is the error:
>
> Parse error: syntax error, unexpected T_STRING in file name on line 12
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
Extra spaces, and no semicolon?
try:
mysql_select_db('database') or die("couldnt connect to databse");
JM