This is my code creating a string from some user input and converts it into an HTML snippet which is pulled from SQL and then displayed on a web page, however, the image url seems to be meeting some opposition somewhere along the line as the html the image url is given as 'Resource id #2'.
// Create result string.
$addresult = "$timestamp - $player1 $result $player2 in the $leagueName league.";
// Set league image variable.
$image = mysql_query("SELECT Image FROM League_Index WHERE LeagueName = '$leagueName' LIMIT 1");
// Create HTML result string
/*
<div class="rt"></div><div class="right_articles"><p><img src="$image" alt="Image" title="Image" class="image" /><b>$entry</b></p></div>
*/
$str1 = '<div class="rt"></div><div class="right_articles"><p><img src="';
$str2 = $str1.$image;
$str3 = $str2.'" alt="Image" title="Image" class="image" height="40px" width="40px" /><b>';
$str4 = $str3.$addresult;
$html = $str4.'</b></p></div>';
<div class="rt"></div><div class="right_articles"><p><img src="Resource id #2" alt="Image" title="Image" class="image" height="40px" width="40px" /><b>09/09/2009 - John defeated Dave in the League 1.</b></p></div>
Any ideas on what is causing this particular problem?