<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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"/>
</head>

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

</div>
<div id = "right">
<br/>
<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/>
<a href = "Farcourts.php">Farcourts</a>
<a href = "Jonnys.php">Jonnys</a>
<a href = "Relax.php">Relax</a>
<table border='1'>
    <tr>
    <th>Agent_ID</th>
    <th>agents</th>

    <?php
    $connect=mysql_connect("localhost","root","");
    $db_selected = mysql_select_db("ong_assessment", $connect);
    $query = "SELECT Agent_ID,agents FROM agents";
    $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['Agent_ID'].'</td>';
    echo '<td>'. $row['agents'].'</td>';

    }
    echo '</table>';
    ?>
</div>
</div>
</div>
</body>
</html>

"varchar" is typically associated with MYSQL datatypes.. What field do you want to make/add "varchar" to?

Be a part of the DaniWeb community

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