Jump to content


This topic is now archived and is closed to further replies.


Image Slideshow

Recommended Posts

Hi There,

I am new to php but would like to use it to create an image slideshow using a mysql db. What i would like to do is to retrieve one record at a time and allow the user to scroll through the results using buttons. can someone point me in the right direction?

This is my code so far:


include 'db.inc';

$skilltype = $_POST["skillset"];
$query = "SELECT id, shortName, mimeName FROM rugbyimages where shortName like '$skilltype'";

if (!($connection = @ mysql_pconnect($hostName, $username, $password)))

if (!mysql_select_db("r36048_images", $connection))
if (!($result = @ mysql_query ($query, $connection)))
<h1><!--p echo $skilltype;--></h1><!--p

echo $num;

  if ($row = @ mysql_fetch_array($result))
<col align="right"><!--p
<td><!--p echo "<img src="view.php?file={$row["id"]-->";?></td></tr><!--p
} while ($row = @ mysql_fetch_array($result));
} // if mysql_fetch_array()
echo "<h3>There are no images to display</h3>n";



Share this post

Link to post
Share on other sites
Well, you'll probably have to pass the uid of the "next" and "previous" images via hidden fields in your HTML.

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.