#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2005
    Location
    Maine,USA Munich,Germany
    Posts
    260
    Rep Power
    10

    Parse error: syntax error, unexpected T_INC, expecting ']'


    I can't figure out where in my php code this error is
    PHP Code:
    <?php
    //Connect to Database
        
    $db 'blahyaddadb';
        
    $db_usr ='blah;
        $db_pass = '
    noblahpass';
        $db_svr = '
    localhost:/var/run/mysqld/mysqld.sock';
        $link = mysql_connect($db_svr, $db_usr, $db_pass);
        mysql_select_db($db);
        $sql = "SELECT `lat`,`lon`,`commentUsr`,`commentBody` FROM gmap";
        $return = mysql_query($sql);
        $i = 0;
        while($row = mysql_fetch_row($return)) {
              $j=0;
            $coord[$i]['
    lat'] = $row[j++];
            $coord[$i]['
    lon'] = $row[j++];
            $coord[$i]['
    commentUsr'] = $row[j++];
            $coord[$i]['
    commentBody'] = $row[j++];
            $i++;
        }
        if (empty($coord[0]['
    lat']) && empty($coord[0]['lon'])){
            $coord[0]['
    lat']=48.860861;
            $coord[0]['
    lon']= 2.336698;
            $string = "I don't know where you are.<br>But have you ever ".
        "been here?<br>It's really nice...<br>Oh, and check your code.";
        }
        else {
            $string = "<dl><dt><b>Our was last Comment Was From:</b></dt><dd>"; 
              $string .= '
    <b>Lat</b'.$coord[0]['lat'].'<br>';
              $string .= '
    <b>Lon</b'.$coord[0]['lon'].'<br>';
              $string .= $coord[0]['
    commentUsr'].'had to about us<br />';
              $string .= $coord[0]['
    commentBody'];
        }
    to see the page here Any help would be great.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2005
    Location
    Maine,USA Munich,Germany
    Posts
    260
    Rep Power
    10
    Answered my self $j++

IMN logo majestic logo threadwatch logo seochat tools logo