I have the following code:
<div id="Container">
<div class="tester">
<table>
<tr><th class="links"><span style="color: #ffd100">MYSQL DATA</span></th></tr>
<tr><th class="links">MYSQL DATA</th></tr>
<tr><th class="links">MYSQL DATA</th></tr>
<tr><th class="links">MYSQL DATA</th></tr>
</table>
</div>
I want the variables "MYSQL DATA" out of my mysql with php echo. I have the conncetion to the database but i don´t know where to insert the echo $row->name; etc.
<?php
mysql_connect("localhost", "XXXXX","XXXXXX") or die ("Verbindung nicht möglich");
mysql_select_db("XXXXXX") or die ("Datenbank existiert nicht");
$abfrage = "SELECT `name` FROM `TEST`";
$ergebnis = mysql_query($abfrage);
while($row = mysql_fetch_object($ergebnis))
{
echo $row->name;
echo $row->id;
}
}
?>