in reply to displaying an image

In your browser rightclick the image, choose properties and take a look at the URI of the image, then compar ethat to the location you wnated to specify.
You might use string concatenation using . eg.:
print '<IMG SRC="'.$courselocation.'/images/'.$value.'">';
Further turn on wanrings using -w in your script and see if you get errors, which you please post here as well.
Have a nice day
All decision is left to your taste