| | |
how to display image in wml page using php
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
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();
?>
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();
?>
![]() |
Other Threads in the PHP Forum
- Previous Thread: sending mail from home servers [localhost]
- Next Thread: HSBC Payment integration
| Thread Tools | Search this Thread |
ajax apache api array beginner beneath binary broadband broken button cakephp checkbox class cms code countingeverycharactersfromastring crack cron curl database date decode display dynamic echo email error file files folder form forms function functions google href htaccess html image include insert integration ip java javascript joomla limit link login loop mail match md5 menu mlm multiple mysql mysql_real_escape_string oop paypal pdf php problem protocol query radio random recursion regex remote script search server session sessions sms smtp soap source space sql strip_tags survey syntax system table tutorial undefined update upload url validator variable video virus votedown web window.onbeforeunload=closeme; xml youtube





