I've pictures inside a database and i wish to see clearly out and display it as being an image. However get strange lengthy charakters as result.

my code:

* @version 1.0 $
* @package HelloWorld
* @copyright (C) 2010 BlaBlbb
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL

/** ensure this file is being included by a parent file */
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
 // assemble query
$query = '
    SELECT *
    FROM artikel

if ( !$database->query() ) {
echo "<script type='text/javascript'>
} else {
$rows = $database->loadObjectList();
echo '<table>';
foreach ($rows as $rowi)

echo '<tr><td>'.$rowi->Artikelname.'</td>';
echo '<td>'.$rowi->Stueckpreis.'</td>';
echo '<td>'.$rowi->Gewicht.'</td>';
echo '<td>'.$rowi->Lagerstand.'</td>';
echo '<td>'.$rowi->Aenderungsdatum.'</td>';
echo '<td><img>'

echo '</table>';
<!--<h1>Hallo Welt</h1>
<p>Das ist ein Test</p>

any suggestions? i wanna possess the image within the same file if at all possible... i'm very a new comer to joomla and so i dont understand how to utilize it having a second php that produces the image...

You are seeing strange figures because you are just echoing the raw image data in to the page. To be able to serve a picture, the browser must request it like a file in the server*.

What this means is you need to either have to:

  1. write your image data to disk, then provide the browser the Hyperlink to the file within the <img> tag, or
  2. you have to produce a script that returns the correct Content-type header for that image type and echos the look data then provide the browser the Hyperlink to the script within the <img> tag.

*: (Yes, there's data:, but that is not really a appropriate solution for many cases. Especially that one.)