I currently have this code. its supposed to get a name from my MySQL database in the row "name" then put "name" into the line of code here:
echo "<img src="http://cravatar.eu/avatar/"name"/50.png">"
but its not working can someone point out whats going wrong it is just keeping $row ['name']
where I want the name to be. I want it so it gets the name from the database and puts the name in the avatar/name/50.png.
Also, I have multiple names in my database; how do I add a picture for all of them? I want it to be a 2-row, 30-column table using the 60 most recent entries to the recentplayers table in my database.
Here is my name.php if that helps:
<?php
$con = mysql_connect("host","user","password");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("quollcr1_hub", $con);
$result = mysql_query("SELECT * FROM recentplayers");
echo "<img src="http://cravatar.eu/avatar/$row ['name']/50.png">"
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['name'] . "</td>";
echo "</tr>";
}
echo "</table>";
mysql_close($con);
?>