Results 1 to 3 of 3

Thread: [RESOLVED] Help fixing Parse error: parse error

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    Resolved [RESOLVED] Help fixing Parse error: parse error

    could any on telll me what i am doing wrong i keep getting this error:

    Parse error: parse error



    pointing at :


    echo("<meta http-equiv="refresh" content="60"> ");

    PHP Code:
    <?
        require("util.php");
        $sql = new MySQL_class;
        $sql->Create("color");


        
        #
        # Selecting Multiple Rows
        #

    echo("<html>");

    echo("<head>");
    [B]echo("<meta http-equiv="refresh" content="60"> ");[/B]

        #echo("<h3>Log History</h3>\n");
        echo("<p><ul><table border=1 cellpadding=4>\n");
        echo("<tr><th>Name</th> > <th> color </th> <th> color2</th> </tr>\n");
        $sql->Query("Select  Name,color,color2 from NameColor");
        for ($i = 0; $i < $sql->rows; $i++) {
            $sql->Fetch($i);
            $Name = $sql->data[0];
            $color = $sql->data[1];
            $color2 = $sql->data[2];
          
           
          
           

            #echo("<tr><td>$Name</td> <td>$color</td> \n");
            #echo("<tr><td><font color="#FF00FF">$Name</font></td> <td>$color</td>  \n");
            echo "<tr><td>" .$Name ." </td> <td>$color</td> <td style='color2:". $color2 ."' >" . $color2 . " </td> \n";
           #echo "<tr><td style='color2:" . $color2 . ";'>" .$Name ." </td> <td>$color</td>  \n";

           
        }
        echo("</table>\n");
        echo("</body>");
        echo("</html>");
      
    ?>

  2. #2
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099

    Re: Help fixing Parse error: parse error

    http://www.vbforums.com/showpost.php...49&postcount=7

    Most of your code doesn't need to be echoed out. PHP shouldn't be used to print out large amounts of HTML, its hard to read and prone to parsing errors like you are getting.

    To prevent getting the error in the furture, you need to escape your " in a string, although for string values you really should be using literals ie '.

  3. #3
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Help fixing Parse error: parse error

    I thought I remembered answering this one earlier
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

Posting Permissions

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



Click Here to Expand Forum to Full Width