FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » why do I get a syntax error?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: why do I get a syntax error? [message #180761 is a reply to message #180759] Sat, 16 March 2013 23:29 Go to previous message
richard is currently offline  richard   
Messages: 213
Registered: June 2013
Karma:
Senior Member
On Sat, 16 Mar 2013 18:44:59 -0400, Jerry Stuckle wrote:

> On 3/16/2013 5:32 PM, richard wrote:
>> if (!$con) { die ("can not connect: " . mysql_error()};
>>
>> generates "Parse error: syntax error, unexpected '}' "
>> i have checked for matching brackets and other obvious syntax errors.
>>
>
> Rewrite it with sensible formatting (as you should ALL your code):
>
> if (!$con) {
> die ("can not connect: " . mysql_error()
> };
>
> You're missing both a right paren and a semicolon.
>
> And the semicolon AFTER the right brace is superfluous.

thanks. fixed that.
it is odd that the video I copied the code from showed that ; after the
right brace.
anyways, the script is exactly what I need.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: change of color on a field value basis in a table...
Next Topic: Stats comp.lang.php (last 7 days)
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 14 09:32:47 GMT 2024

Total time taken to generate the page: 0.04579 seconds