Hey all I gotta question on a script i'm working on....working example is @ http://www.shanb.com/events
Here's the script
What i want to do, is only display 10 pictures per page and have links on the bottom that are like page 1 page 2 page 3 and so on....anyone have any advice....
Here's the script
PHP:
<?
mysql_connect(localhost,'user','pass') or die ("No connection");
mysql_select_db('events') or die ("No database found!");
$query = ("SELECT * FROM pics WHERE picevent = '$pic_event' ORDER by picorder ASC");
$result = mysql_query($query);
$numrows = mysql_num_rows($result);
if($numrows=='0'){
echo "<tr><td colspan='2' align='center'>Sorry, no pictures for this event ( [b][i]<u>$pic_event</u>[/i][/b] )!!</td></tr>\n";
echo "<tr><td colspan='2' align='center'>Maybe I'll put them up sometime...</td></tr>\n";
}
for ($cur = 0; $cur < $numrows; $cur++){
$row = mysql_fetch_array($result);
echo "<tr><td>[url='viewimage.php?picture=$row[picname]'][img]./$row[picevent]/$row[picname][/img][/url]</td>\n";
echo "<td>$row[piccoments]</td>\n";
echo "</tr>\n";
}
mysql_close();
?>
What i want to do, is only display 10 pictures per page and have links on the bottom that are like page 1 page 2 page 3 and so on....anyone have any advice....