Копировал 52 строки кода. Дальше такой же вывод, но других таблиц с MySQl
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Вивід</title>
</head>
<body>
<?php
session_start();
include 'connect.php';
$_SESSION['table']=$_GET['Table'];
$table = $_SESSION['table'];
if($table == "department")
{
if ($res = $mysqli->query( "SELECT * FROM $table"))
{
?>
<table border="1">
<caption>Дані таблиці <?php print ($table) ?>:</caption>
<tr>
<th>Код відділу</th>
<th>Адреса</th>
<th>Телефон</th>
</tr>
<?php
while( $row = mysqli_fetch_assoc($res))
{
?>
<tr>
<th><?php print ($row["Код відділу"]) ?></th>
<th><?php print ($row["Адреса"]) ?></th>
<th><?php print ($row["Телефон"]) ?></th>
// пробелемы на трех строках
</tr>
<?php
}
?>
</table>
<p><a href="login.php">На головну</a></p>
<a href="logout.php">Вийти</a>
<?php
$res->close();
}
Структура таблицы http://screenshot[dot]su/show.php?im[dot][dot][dot]f2d89a739096[dot]jpg
|