India Forums .Info

Discuss Cars, Bikes, Jobs, Romance, Marriage, Jobs, Real Estate, Programming and more..
It is currently Wed Dec 03, 2008 3:59 am

All times are UTC + 5:30 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: adding and displaying images
PostPosted: Thu Apr 17, 2008 2:18 pm 
Offline
Newbie

Joined: Wed Apr 16, 2008 8:55 pm
Posts: 2
right ive created a imagetest table in phpmyadmin and added a image to it, i can view the first image however when i add another image i am having trouble viewing the 2nd image ie 'nokia' can anyone help? my code is as follows only OutBack image is displayed:

<?php
$DB_Host = "xxxxxx";
$DB_Username = "xxxxxx";
$DB_Password = "xxxxx";
$DB_Name = "xxxxxxx";

$ret=mysql_connect($DB_Host, $DB_Username, $DB_Password) or die ("Can no connect");
$db=mysql_select_db($DB_Name);


$sql=" SELECT image FROM `imagetest` WHERE Name = 'OutBack' LIMIT 0 , 30 ";
$result=mysql_query($sql);
$row=mysql_fetch_row($result);
$img=$row[0];
header("Content-Type: image/jpeg");
print "$img";

$db=mysql_select_db($DB_Name);
$sql=" SELECT image FROM `imagetest` WHERE Name = 'nokia' LIMIT 0 , 30 ";
$result=mysql_query($sql);
$row=mysql_fetch_row($result);
$img=$row[0];
header("Content-Type: image/jpeg");
print "$img";

?>
Please help - Is it because I'm going about the incorrect way - should I approach it in some other way ?????


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 5:30 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

phpBB SEO