Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in G:\xampp\htdocs\Thorndon.php on line 57

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
<html xmlns="">
<meta name = "description" content = "Wellington Real Estate"/>
<meta name = "keywords" content = "home, housing, Karori, Mirimar, Te Aro, Thorndon, Farcourts, Jonnys, Relax"/> 
<title> Agents </title>
<link rel = "stylesheet" type = "text/css" href = "assessment.css"/>

<div id = "wrapper">
<div id = "container">
<div id = "banner">
<h1>The Wellington Real Estate Company</h1>
<div id = "left">
<a href = "Index.html">Home</a>
<a href = "Agents.html">Agents</a>
<a href = "Suburbs.html">Suburbs</a>

<div id = "right">
<h2>Listing of Houses by Agent</h2>
<p>All our agents are currently listing a range of properties. Please click on one of the links to see that agent's listings: </p><br/>
<h1> Thorndon </h1>
    <table border='1'>

/* This code establishes a connection with the database on the server. 
The mysql_connect accepts three parameters. The mysql_select_db attempts to select the database that data will be retrived from. 
It accepts two parameters, one is the name of the database and the other is the connection variable.*/

    $db_selected = mysql_select_db("ong_assessment", $connect);
    $query = "SELECT houses.Address, houses.Bedrooms,houses.Bathrooms,houses.Price, houses.Agent_ID, houses.Agents, houses.Suburb_ID, houses.Suburb
    FROM houses, suburb
    WHERE houses.Suburb_ID=suburb.Suburb_ID
    AND suburb.suburb= 'Thorndon';

    $result = mysql_query($query) or die(mysql_error());
    if(!mysql_affected_rows() >= 1)
    echo 'There are no entries inside the database';
    while($row = mysql_fetch_array($result))
    echo '<tr>';
    echo '<td>'. $row['Agents'].'</td>';
    echo '<td>'. $row['Agent_ID'].'</td>';
    echo '<td>'. $row['Suburb'].'</td>';
    echo '<td>'. $row['Suburb_ID'].'</td>';
    echo '<td>'. $row['Address'].'</td>';
    echo '<td>'. $row['Bedrooms'].'</td>';
    echo '<td>'. $row['Bathrooms'].'</td>';
    echo '<td>'. $row['Price'].'</td>';
    echo '</table>';



Looks like a dquote missing:

AND suburb.suburb= 'Thorndon'";
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.