agallo Posted August 1, 2007 Share Posted August 1, 2007 I need to access data from a database and repeat the display for how many rows there are...Well I figured out the whole repeat thing I just can't make it go to the next row when it outputs... <?php $pages = $totalRows_dallas ; while( $pages > 0 ) { ?> <li > <a target="quote" onmouseover="changemap(<?php echo $row_dallas['latitude']; ?>, <?php echo $row_dallas['longitude']; ?>, <?php echo $row_dallas['zoom']; ?>);" href="int_quote.php?id=<?php echo $row_dallas['id']; ?>"> <span style="float:right"> <input type="button" name="3" value="Add Store" /></span> <?php echo $row_dallas['name']; ?><br /> <?php echo $row_dallas['address']; ?><br /> <?php echo $row_dallas['city']; ?>, <?php echo $row_dallas['state']; ?> <?php echo $row_dallas['zip']; ?> </a> </li> <?php $pages--; } ?> RESULT: I'm getting the same row of info repeated WHAT I NEED: is for when it repeats it grabs the next row in order from 'id' Thanks so much in advance for any help! Link to comment https://forums.phpfreaks.com/topic/62890-solved-im-getting-the-same-row-of-info-repeated/ Share on other sites More sharing options...
DeepakJ Posted August 1, 2007 Share Posted August 1, 2007 //Try something like this $query = "SELECT * FROM '$table'"; $Result = mysql_query($query); while($pages=mysql_fetch_array($Result)){ echo "htmlstuff" echo $pages['information'] } Link to comment https://forums.phpfreaks.com/topic/62890-solved-im-getting-the-same-row-of-info-repeated/#findComment-313063 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.