if ($EVENTYEAR == "")
{$EVENTYEAR = '%';}
if ($EVENTDATE == "")
{$EVENTDATE = '%';}
$result = mysql_query ("SELECT * FROM thisday
WHERE EVENTYEAR LIKE '%$EVENTYEAR%'
AND EVENTDATE LIKE '%$EVENTDATE%'
ORDER BY EVENTYEAR ASC
",$conn);
$resultall = mysql_query ("SELECT * FROM thisday");
$totalrecs = mysql_num_rows($resultall);
$totalrows = mysql_num_rows($result);
if ($row = mysql_fetch_array($result)) {
do {
echo "<table bgcolor=#FFFEEF border=0 cellpadding=2 cellspacing=0 style=border-collapse: collapse bordercolor=#111111 width=100%>
<tr><td align=left width=20% valign=top><b><font face=Verdana size=2 color=#800080><li>{$row['EVENTDATE']}</font></b></td>
<td align=justify width=80% valign=top><font face=Verdana size=2 color=#000000>{$row['EVENTTEXT']}</td></table>";
echo ("<p>");
echo ("<p>");
} while($row = mysql_fetch_array($result));
} else {print "<font face=Verdana size=2 color=#FF0000><b>Sorry, no records were found!</font></b>";}
?>
</td>
</tr>
</table>
</td>
</tr>
</table>
<?
echo "<table bgcolor=#FFFEEF border=0 cellpadding=1 cellspacing=0 style=border-collapse: collapse bordercolor=#111111 width=100%>
<td align=left width=70% valign=top><font face=Verdana size=2 color=#FF0000><b>$totalrows</b></font><font face=Verdana size=2 color=#800000> out of </font><b><font face=Verdana size=2 color=#FF0000>$totalrecs</font></b><font face=Verdana size=2 color=#800000> record(s) found !</font></b></td></table>";
?>
next back navigation!
Moderator: General Moderators
-
sirTemplar
- Forum Commoner
- Posts: 65
- Joined: Wed Dec 18, 2002 1:57 am
next back navigation!
i have this search script that outputs all the data on the database. i would like to limit the number of data shown each page, let's say to 10 and put a next and back botton down.... anyone willing to help?
This article should be right up your street:
http://www.devshed.com/Server_Side/PHP/ ... page1.html

Regards,
http://www.devshed.com/Server_Side/PHP/ ... page1.html
Regards,