displaying images retreived from database uisng php
<p>i would like to know how to display the image  in a particular div which stored in a database using php?</p>

<p>The code i used is</p>

<pre><code>&lt;form method="post"&gt;
&lt;input type="button" name="show" value="show"/&gt;&lt;br/&gt;
&lt;input type="image" id="image_show" name="img" value="img"/&gt;
&lt;/post&gt;

if(@$_POST['show'])
    {
        $sql="select imageData form images ORDER BY DESC";
        $result=mysql_query($sql) or die('invalid query'.mysql_error());
        //set header
        header("Content-type:image/png");
        echo mysql_result($result,0);
        while( $row = mysql_fetch_row( $result ) )
        {
            echo "&lt;img src='".$row[0]."'/&gt;";
            }
        }
</code></pre>

<p>But it not working..please help me out..thank u</p>
