I get this error message:
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/redlemons.com/httpdocs/new/albums.php on line 18
and despite this message I cant see where the problem is in my code:
Code: Select all
<table cellpadding='7' width='100%'>
<tr>
<td>
<font face='arial' size='4'>
My Albums<p>
<font size='2'>
";
$id = $_SESSION['id'];
$album = mysql_query("SELECT * FROM albums WHERE userid='$id'");
echo "<table width='50%'>";
while ($row = mysql_fetch_assoc($album))
{
echo "
<tr>
<td>
<img src='store/".$row['cover']."' width='100' height='100'>
</td>
<td>
<b>".$row['name']."</b><br>
".$row['description']."
</td>
</tr>
";
}
echo "</table>