Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $host = "ip";
- $user = "user";
- $pass = "pass";
- $data = "db";
- $db = mysql_connect($host, $user, $pass);
- if (!$db){
- echo "<h2>Error!</h2>";
- exit;
- }
- mysql_select_db($data, $db);
- $inv = ("SELECT * FROM LOG1 LIMIT 0, 4");
- $sql = mysql_query($inv, $db);
- echo "<table class='table table-condensed table-striped' style='background:#ddd;margin-bottom:0'>";
- echo "<tr><td>Дата:</td><td>Время:</td><td>Номер:</td><td>Текст:</td></tr>";
- while ($tablerows = mysql_fetch_row($sql))
- {
- echo "<tr><td>", $tablerows[0], "</td>", "<td>", $tablerows[1], "</td>", "<td>", $tablerows[2], "</td>", "<td>", $tablerows[3], "</td></tr>";
- }
- echo "</table>";
- mysql_close($db);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement