Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $host = "localhost";
- $user = "root";
- $password = "nopass";
- $db = "jiguri";
- $conn = mysql_connect($host,$user,$password) or die("Problems connecting:" . mysql_error());
- $dbselect = mysql_select_db($db, $conn) or die("Error selecting DB:" . mysql_error());
- $check = "select * from `seriale`";
- $result_check = mysql_query($check);
- $count = mysql_numrows($result_check);
- echo '<table border="1" cellpadding="15" cellspacing="0">
- <tbody>
- <tr>
- <th>id</th>
- <th>serial</th>
- </tr>
- ';
- for ($i=0;$i<$count;$i++)
- {
- $id = "select id from `seriale`";
- $result_id = mysql_query($id);
- $id_list = mysql_result($result_id,$i);
- $serial = "select serial from `seriale`";
- $result_serial = mysql_query($serial);
- $serial_list = mysql_result($result_serial,$i);
- echo "<tr><td>" . $id_list . "</td><td>" . $serial_list . "</td></tr>"."\n";
- }
- echo "</tbody></table>";
- ?>
Add Comment
Please, Sign In to add comment