What is the simplest way to scroll through the records in a database. What I had done was create a table which stores links to image files. These image files are then queried and displaye on screen. Not a problem here. But what I would like to do is have the images display on screen on at a time. The user will press either an arrow key or link to scroll either foward or backwards. I checked out some tutorials, but the ones I've checked seen a little complicated. Then again this is all new to me. I was trying to use the LIMIT command.
Any assistance would be appreciated.
Thank you,
KJ
PS here is a sample of my code, if needed;
db=mysql_connect("anyhost","anyuser",""
or die("Could not connect : " . mysql_error());
print "Connected successfully";
print "<br>";
print "<center><h2><b>User Logon Database</b></h2></center>";
mysql_pconnect();
mysql_select_db("mylogin" or die("Could not select database"
$query = ("SELECT * FROM myimagexx ".limit 1.1);
$result = mysql_query($query) or die("Query failed : " . mysql_error());
/* Printing results in HTML */
print "<br>";
print "<table width=75% border=1>\n";
print "<td width=14%><b>UserID</b></td>";
print "</tr>";
print "</table>";
while ($row= mysql_fetch_array($result))
{
print "<table width=75% border=1>\n";
print "<td width=8%>";
//echo '<img src=' .$row['imagefilepath']. '>';
//or
$image = $row['imagefilepath'];
echo "<img src=$image>";
print "</td>";
}
/* Free resultset */
mysql_free_result($result);
/* Closing connection */
mysql_close($db);
Any assistance would be appreciated.
Thank you,
KJ
PS here is a sample of my code, if needed;
db=mysql_connect("anyhost","anyuser",""
or die("Could not connect : " . mysql_error());
print "Connected successfully";
print "<br>";
print "<center><h2><b>User Logon Database</b></h2></center>";
mysql_pconnect();
mysql_select_db("mylogin" or die("Could not select database"
$query = ("SELECT * FROM myimagexx ".limit 1.1);
$result = mysql_query($query) or die("Query failed : " . mysql_error());
/* Printing results in HTML */
print "<br>";
print "<table width=75% border=1>\n";
print "<td width=14%><b>UserID</b></td>";
print "</tr>";
print "</table>";
while ($row= mysql_fetch_array($result))
{
print "<table width=75% border=1>\n";
print "<td width=8%>";
//echo '<img src=' .$row['imagefilepath']. '>';
//or
$image = $row['imagefilepath'];
echo "<img src=$image>";
print "</td>";
}
/* Free resultset */
mysql_free_result($result);
/* Closing connection */
mysql_close($db);