-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTableBD.php
More file actions
40 lines (37 loc) · 1.21 KB
/
TableBD.php
File metadata and controls
40 lines (37 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
mb_internal_encoding("utf-8");
$db = mysql_connect("localhost","localhost","123");
mysql_select_db("name", $db);
$result = mysql_query("SELECT * FROM names", $db);
?>
<!DOCTYPE html>
<html lang="ru">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>Table</title>
<link rel='stylesheet' href='css/bootstrap.min.css' type='text/css' media='all'>
<link rel='stylesheet' href='/css/creative.css' media='all'>
</head>
<body>
<div id="table">
<table class="table table-bordered table-striped">
<thead>
<tr class="success">
<th>Номер</th>
<th>Имя</th>
</tr>
</thead>
<tbody>
<?php mb_internal_encoding("UTF-8");
while ($row = mysql_fetch_assoc($result)) {
?>
<tr>
<td><?php echo $row['ID']; ?></td>
<td><?php echo $row['name'] ?></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</body>
</html>