i am doing a site for appliance center..
i need to display all the products that the company offers, but my problem is that i cant display ALL the images in my database.. the first entry on the database is the only one that displays..
i am using mysql as database
here's the code.. tell me what's my error and pls. kindly edit it..
**imgdata = it is where i store the image.. longblob is the data type
[code=php]
<?php
$errmsg = "";
if (! @mysql_connect( "localhost","ro ot",""))
{
$errmsg = "Cannot connect to database";
}
@mysql_select_d b("upload");
$gotten = @mysql_query("s elect imgdata from pix");
header("Content-type: image/jpeg");
while ($row = mysql_fetch_arr ay($gotten))
{
print $row['imgdata'];
}
mysql_free_resu lt($gotten);
?>[/code]
i need to display all the products that the company offers, but my problem is that i cant display ALL the images in my database.. the first entry on the database is the only one that displays..
i am using mysql as database
here's the code.. tell me what's my error and pls. kindly edit it..
**imgdata = it is where i store the image.. longblob is the data type
[code=php]
<?php
$errmsg = "";
if (! @mysql_connect( "localhost","ro ot",""))
{
$errmsg = "Cannot connect to database";
}
@mysql_select_d b("upload");
$gotten = @mysql_query("s elect imgdata from pix");
header("Content-type: image/jpeg");
while ($row = mysql_fetch_arr ay($gotten))
{
print $row['imgdata'];
}
mysql_free_resu lt($gotten);
?>[/code]
Comment