Any idea why this code will not load the picture, which is called from a file using the artist name, stored in the database? The code should remove the ' and the space from the name, but it doesn’t seem to happen. I doubled checked the name in the database (Ol' Scratch) and the name of the file stored in the folder (OlScratchBig.gif). Any help would be appreciated. Thanks. Here is the code:
<?
mysql_connect("localhost","name","pass");
mysql_select_db("ims_search");
$myValue = "Ol' Scratch";
$result = mysql_query("SELECT * FROM artist where artist_name like '$myValue%' limit 1 ");
//grab all the content
while($r=mysql_fetch_array($result))
{
$artist_name=$r["artist_name"];
$unwanted=array(0=>"'", 1=>" ", 2=>"Big");
$big="Big";
$clean=str_replace($unwanted,"",$artist_name);
//display the row
echo "<center><image src='http://MyUrl/ArtistImages/$clean$big'></center></a>";
}
?>