Jump to content

Pagination w/ >1 table field echoed


sKunKbad

Recommended Posts

My pagination works, I have this:

[code]if (!isset($_GET['page'])){
  $page = 1;
} ELSE {
  $page = $_GET['page'];
}
$max_results = 10;
$from = (($page * $max_results) - $max_results);
$sql = mysql_query("SELECT * FROM localdirectory LIMIT $from, $max_results");                                
                                          
while($row = mysql_fetch_array($sql)){                                
echo $row ['name']."<br/>";[/code]

which is all good, but it only outputs the name field of my database, I want to be able to output all of the other fields, like ['address'],['city'],['st'],['zip']. I've tried adding that in various ways, but can't get it to work.

I can't figure it out. Please help.

Thanks for your help!
Link to comment
https://forums.phpfreaks.com/topic/6447-pagination-w-1-table-field-echoed/
Share on other sites

Archived

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

×
×
  • Create New...

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.