Results 1 to 5 of 5

Thread: Unexpected "."

  1. #1
    Join Date
    Aug 2007
    Location
    Malaysia
    Posts
    117
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Unexpected "."

    Hey,guys!What went wrong with the script?I having syntax error of unexpected "." in first line of second echo.Thanks...

    PHP Code:
    <?php      
        $tbl_name 
    "movie";

        
    $result mysql_query("SELECT name,director,casting,duration,classification,language, synopsis,banner FROM  FROM %s LIMIT 7', $tbl_name") or die("Cannot execute query.");
                  
                  while (
    $rows mysql_fetch_assoc($result)) {
            echo 
    '<table width="100%" border="0"><tr><td height="68">
                      <table width="100%" height="47" border="0">
                       ---------------------------------------------------------------------------------------------------------'
    ;
          echo   . 
    $rows['banner'] .'<strong>'Title: . $rows['name'] .'<br>'
             
    Classification: . $rows['classification'] .'<br>'Duration
            . 
    $rows['duration'] .'<br>' Language: . $rows['language'] .'<br>'
             
    Director: . $rows['director'] .'<br>'Cast: . $rows['cast'] .'<br>'
             
    Synopsis: . $rows['synopsis'] .'<br></strong>';
       }
    ?>

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    The first . you don't need in that line. Get rid of the dot right after the echo and it should be fine.
    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    Join Date
    Aug 2007
    Location
    Malaysia
    Posts
    117
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Well,what wrong again?The second line having T_CONSTANT_ENSCAPED_STRING expecting ' ' or ';'

    PHP Code:
    echo   $rows['banner'] .'<strong>Title:' $rows['name'] .'<br>' 
    'Classification:' 
    $rows['classification'] .'<br>Duration:' 
    $rows['duration'] .'<br> Language:' $rows['language'] .'<br>' 
    'Director:' 
    $rows['director'] .'<br>Cast:' $rows['cast'] .'<br>' 
    'Synopsis:' 
    $rows['synopsis'] .'<br></strong>'

  4. #4
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    You had some extra quotes in there that didn't need to be. Try the below in its place.

    Code:
    echo   $rows['banner'] .'<strong>Title:' . $rows['name'] .'<br> 
    Classification:' . $rows['classification'] .'<br>Duration:' 
    . $rows['duration'] .'<br> Language:' . $rows['language'] .'<br>
    Director:' . $rows['director'] .'<br>Cast:' . $rows['cast'] .'<br> 
    Synopsis:' . $rows['synopsis'] .'<br></strong>';
    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  5. #5
    Join Date
    Aug 2007
    Location
    Malaysia
    Posts
    117
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Problem resolved.thanks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •