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 #180759 is a reply to message #180753] Sat, 16 March 2013 22:44 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
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.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[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:31:13 GMT 2024

Total time taken to generate the page: 0.06040 seconds