Re: Parse error: parse error, unexpected T_VAR



Carl wrote:
carlton wrote:

The following code extract generates ab unexpected T_VAR error at line 63. Note the line numbers have been added.
I am running PHP 4.3.8, apache 2 on Linux mandrake 1.1 official
52 /
53 // connect to the mysql server
54 //
55 $link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
56 if (!$link) {
57 die('Could not connect: ' . mysql_error());
58 }
59 print("<h2> connected to server - <I>so far so good<\I><\h2>\n\n"
60 //

<...snip> Hint: I don't think that line 59 does what you think it does...

Hth,
Carl.
Thanks, easy to miss these typos.
.



Relevant Pages

  • Re: Parse error: parse error, unexpected T_VAR
    ... carlton wrote: ... I am running PHP 4.3.8, apache 2 on Linux mandrake 1.1 official ...
    (alt.php)
  • Re: mod_php not secure?
    ... Alvaro G Vicario wrote: ... > I'm running PHP as Apache 2 module in Red Hat 9 and there's no such file as ... Could it be that Apache is so popular because the people ...
    (comp.lang.php)
  • Re: [PHP] MkDir Help
    ... I am running PHP 5.2.5 on Linux. ... My guess is it's a permission denied error, ... Either make Apache the owner of the directory, ... the Apache group ...
    (php.general)
  • Re: [PHP] Create .php file with php
    ... I'm running PHP 5.1.6 on Apache 2, ... I had trouble with this also running php 5.1.2 and now 5.2.1. ... I also had trouble opening and modifying html files but got the hang of that too. ...
    (php.general)
  • index.php not autoloading in apache
    ... I am running PHP v5.2.6 on an Apache v2.2 server. ... For some reason, Apache is not automatically loading index.php files, even when there is no other index.* file in the directory; it will throw a "you do not have permission to access " instead. ... the server OS is FreeBSD-7.0-RELEASE. ...
    (php.general)