hi,

I have written this small code section

<?php

// database connection
$host = "localhost";
$user = " ";
$pass = " ";
$db = "  ";
$table= "test";

$conn = mysql_connect($host, $user, $pass)
OR DIE (mysql_error());
@mysql_select_db ($db, $conn) OR DIE (mysql_error());

$sql="SELECT * FROM $table WHERE image_id=100100";

$result=mysql_query($sql) or die(mysql_error( ));

$row=mysql_fetch_assoc($result);

$numfield=mysql_num_fields($result);


asort($row);

foreach ($row as $key => $val) {
   if( $key != 'image_id' ){
   $a=$key;
   $b='.jpg';
   $c=$a.$b;
   $im=@imagecreatefromjpeg($c);
   imageJPEG($im);
    } 
}




?>

but the output i got can only display one image, how can i display more than one image

thanks in advance,
tris

You will need to call it as the image source each time it's required

eg

<img src='myimage.php?image_id=10001'><br />
<img src='myimage.php?image_id=12032'>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.