how to display image in wml page using php

Reply

Join Date: Jun 2008
Posts: 3
Reputation: binukjames is an unknown quantity at this point 
Solved Threads: 0
binukjames's Avatar
binukjames binukjames is offline Offline
Newbie Poster

how to display image in wml page using php

 
0
  #1
Jun 26th, 2008
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['imgdata'];
}
header("Content-type: image/jpeg");
echo $bytes;
exit ();
mysql_close();
?>
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC