Parse error: syntax error, unexpected T_ECHO . please help

Discussion in 'PHP' started by Kurt Whittingham, Mar 12, 2012.

  1. #1
    hello im trying to display something from my data base
    here is the code
    <?php
        $categories = "Gear Reviews";
    
        // setup SQL statement
        $SQL = " SELECT * FROM Gear Reviews ";
        $SQL = $SQL . " WHERE categories = '$categories' ";
    
        // execute SQL statement
        $retid = mysql_db_query($db, $SQL, $cid);
    
        // check for errors
        if (!$retid) { echo( mysql_error()); }
        else {
    
            // display results
            echo ("<p><dt><b>$categories</b><br>\n");
            while ($row = mysql_fetch_array($retid)) {
                $url = $row["url"];
                $name = $row["name"];
                $description = $row["description"]
    
                echo ("<p><a href='$url'>$name</a></p>\n");
            }
            echo ("</dt></p>");
        }
    ?>
    PHP:

     
    Last edited: Mar 12, 2012
    Kurt Whittingham, Mar 12, 2012 IP
  2. Kurt Whittingham

    Kurt Whittingham Member

    Messages:
    151
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    46
    #2
    i worked it out there wasnt a ; after description
     
    Kurt Whittingham, Mar 13, 2012 IP