alcoholic1 Posted July 4, 2006 Share Posted July 4, 2006 im basically looking for a simply way to display every entry in the database in a table on the php page any one know a good way ? Quote Link to comment https://forums.phpfreaks.com/topic/13646-display-all-entrys-in-mysql-database-on-php-page/ Share on other sites More sharing options...
wildteen88 Posted July 4, 2006 Share Posted July 4, 2006 Have a read of [url=http://www.php-mysql-tutorial.com/php-mysql-select.php]this tutorial[/url] for getting data out of the database. Quote Link to comment https://forums.phpfreaks.com/topic/13646-display-all-entrys-in-mysql-database-on-php-page/#findComment-52946 Share on other sites More sharing options...
Dville Posted July 4, 2006 Share Posted July 4, 2006 First make a connection with the following code[code]// Make a MySQL and database connectionmysql_connect("LOCALHOST","USERNAME","PASSWORD") or die(mysql_error());mysql_select_db("TABLE") or die(mysql_error());[/code]and edit the uppercase settings.then use[code]while($row = mysql_fetch_array( $result )) {[/code]then say you have a field called 'blah' and one called 'blah2'you use the code[code]echo $row['blah'];echo $row['blah2'];[/code]or you can even do something like[code] $blah = $row['blah']; $blah2 = $row['blah2'];[/code]and use the new variables for the data. don't forget to close the while loop with another '}' Quote Link to comment https://forums.phpfreaks.com/topic/13646-display-all-entrys-in-mysql-database-on-php-page/#findComment-52975 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.