Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more - View Single Post - php pagination
Thread: php pagination
View Single Post
Old 11-24-2005, 10:00 AM   #3 (permalink)
que
Junior Member
 
Join Date: Aug 2005
Posts: 31
Default

Thanks ~cristobal I know about phpmyadmin but I am building a script to display my data on my site.

Code:
<html> 
<head><title>My Page Title</title></head> 
<body> 
<?php 
$database="mydbname"; 
mysql_connect ("localhost", "myusername", "mypassword"); 
@mysql_select_db($database) or die( "Unable to select database"); 
$result = mysql_query( "SELECT * FROM mytable" ) 
or die("SELECT Error: ".mysql_error()); 
$num_rows = mysql_num_rows($result); 
print "There are $num_rows records.<P>"; 
print "<table width=400 border=1>\n"; 
while ($get_info = mysql_fetch_row($result)){ 
print "<tr>\n"; 
foreach ($get_info as $field) 
print "\t<td><font face=arial size=1/>$field</font></td>\n"; 
print "</tr>\n"; 
} 
print "</table>\n"; 
?> 
</body> 
</html>
This is what I have so far but I do not know how to add the PREV 1,2,3 NEXT part of it..
thanks
que is offline   Reply With Quote
Sponsored Links