binukjames 0 Newbie Poster

I'm developing a wap site with wml and php.
my php code is retrievig and displaying blob image from database.
but i cannot include any wml part to this page.
actually i want to display image from database with some links (wml or php).
is it possible ? plz help me.... very urgent

my php code is....

<?php
function db_connect($user='root', $password='admin', $db='example')
{
mysql_connect('localhost', $user, $password) or die('I cannot connect to db: ' . mysql_error());
mysql_select_db('example');
}
db_connect();
$sql = "select imgdata from pix where title=2";


$result = mysql_query("$sql");
while($row = mysql_fetch_assoc($result))
{
$bytes = $row;
}
header("Content-type: image/jpeg");
echo $bytes;
exit ();
mysql_close();
?>