Hey guys can anyone tell me what is wrong with this code, it is meant to show images from the database however im trying to insert urlencode() so that it also shows images that have spaces in their name?
[php] <?php
$query = mysql_query(“SELECT proid FROM fck_data WHERE id = 1”);
$raw_result1 = mysql_fetch_array($query);
$proid = $raw_result1[‘proid’];
//Retrieves data from MySQL
$data = mysql_query(“SELECT filename FROM xcart_images_D WHERE id = ‘$proid’”) or die(mysql_error());
while($info = mysql_fetch_array( $data ))
{
//Outputs the image and other data
Echo “<img src=http://www.mywebsite.com/images/D/”.urlencode($info[‘filename’]).">
";
}
?>[/php]
Your help is greatly appreciated.