showing database table in php

Solutions on MaxInterview for showing database table in php by the best coders in the world

showing results for - "showing database table in php"
Diego
15 Jul 2017
1$connection = mysql_connect('localhost', 'root', ''); //The Blank string is the password
2mysql_select_db('hrmwaitrose');
3
4$query = "SELECT * FROM employee"; //You don't need a ; like you do in SQL
5$result = mysql_query($query);
6
7echo "<table>"; // start a table tag in the HTML
8
9while($row = mysql_fetch_array($result)){   //Creates a loop to loop through results
10echo "<tr><td>" . $row['name'] . "</td><td>" . $row['age'] . "</td></tr>";  //$row['index'] the index here is a field name
11}
12
13echo "</table>"; //Close the table in HTML
14
15mysql_close(); //Make sure to close out the database connection
queries leading to this page
show sql to php tabledisplay database info as a table in phphow to display mysql database on web pagehow to show database table using phphow to display database table in phphow to print database phphow to show sql table row in phpphp sql output tableshowing database table in phpshow database and table in phpphp display data from database in tabledisplaying mysql data in html tablehow to display mysql data in html tableshow sql result in html tablephp sql file display tablehow to show table from database in phphow to display table from database in phpdisplaying sql table in phpphp echo dynamic tablesprint table from database phpshow table from db using php codeshow table sql phpdiplay data stored mysql in phpprint data from sql with phpsql data show in tabe html phpsql echo tablesinfo from sql in table htmlphp show database tablehow to display database tables in php as a proper tabledisplay database table in phpdisplay sql table htmlhow to view mysql database table in phphow to output sql into table in phpsql data show in html table phpphp showing mysql tablehow to print database table in phpdisplay table from database in phpphp showing mysql table with designhow to display a database table in phpphp print data from databasehow to display sql table with phphow to show sql table in htmlphp sql view tablehow to print a table in php from databasehow to display database tables in phpdisplaying database table in phphtml table sql phpdisplay sql data in html tablephp print from databasehtml show sql datahow to show database table in phpdisplay sql on htmlecho database table phpshowing table form mysql on websiteuser html to display data from mysqlhow to display database table in form phpphp display sql tablephp show sql tabelphp echo data from databasephp table show in html sql datashowing database table in php