are you sure that $user_profile[20] is not blank and holds a jpg or gif or swf value? Also is $user_profile[20] correct slot? I dont know ubb member fields...
The above code seems right to me...
You can set a default valuve where it says 'my $this_img;'
my $this_img = '';
Also, if it does not hold the full url, add it before $this_image;
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.