Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ini_set('display_errors',1);
- error_reporting(E_ALL);
- mysql_connect('localhost', 'root', '');
- mysql_select_db('testdb');
- $result = mysql_query('select * from products');
- $numrows = mysql_numrows($result);
- //****************************************************************
- print "<table border = 3 style = width:400px>";
- for($i = 0; $i < $numrows; $i++)
- {
- $row = mysql_fetch_row($result);
- print "<tr>";
- foreach($row as $cell)
- {
- print "<td>";
- print $cell;
- print "</td>";
- }
- print "</tr>";
- }
- print "</table>";
- mysql_close();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement