title: php+mysql slideshow of images
body: <p>i have created a database named movie and there is table named test_image(id int autoincrement,name varchar(30),image blob). Data is inserted with the help of php code.Now i have displayed images with the help of following code:</p>
  
  <hr>
  
  <pre><code>&lt;?php
  $host="yourhostname";
  $user="username";
  $pass="password";
  $db="movie";
  
  // just so we know it is broken
  error_reporting(E_ALL);
  
  //connect to the db
  $link = mysql_connect("$host", "$user", "$pass") or die("Could not connect: " . mysql_error());
  
  // select our database
  mysql_select_db("$db") or die(mysql_error());
  
  // get the image from the db
  $sql = "SELECT image FROM test_image;";
  
  // the result of the query
  $result = mysql_query("$sql") or die("Invalid query: " . mysql_error());
  
  // set the header for the image
  header("Content-type: image/jpeg");
  
  echo mysql_result($result, 0);
  
  // close the db link
  mysql_close($link);
  </code></pre>
  
  <p>?></p>
  
  <hr>
  
  <p>it shows only one image
  now if i want to slideshow of images in database what changes i have to make??</p>