I'm trying to pull some results from a database but I guess I'm kind of brain dead today.
$castquery = "SELECT * FROM cast " .
"WHERE player_id = '" . $userid ."' ";
$castresult = mysql_query($castquery) or die(mysql_error());
$castrow = mysql_fetch_array($castresult);
...
foreach($castrow['cast_id'] as $caster)
{
echo "<p>";
if ($caster['avatar_url']!='') echo "<img src=\"".$caster['avatar_url']."\" alt=\"".$caster['name']."\">";
echo "<a href=\"?edit=".$caster['cast_id']."\">".$caster['name']."</a></p>";
}
Surely I'm overlooking something obvious here.