Re: syntax error, unexpected T_STRING

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jim Moseby wrote:
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
Thanks JM!
It was another one of my usual mistakes :P
Forgot the semicolon. I don't underestand why you have to put in so many semicolons... Hmm.. Is it a thing from C or something?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux