You are here: Re: [PHP] syntax error, unexpected T_STRING « PHP « IT news, forums, messages
Re: [PHP] syntax error, unexpected T_STRING

Posted by George B on 07/18/05 21:29

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?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация