Форум программистов, компьютерный форум, киберфорум
PHP: базы данных
Войти
Регистрация
Восстановить пароль
Карта форума Темы раздела Блоги Сообщество Поиск Заказать работу  
 
Рейтинг 4.67/3: Рейтинг темы: голосов - 3, средняя оценка - 4.67
0 / 0 / 0
Регистрация: 10.05.2016
Сообщений: 75
1

Выводит таблицу после текста

25.05.2016, 09:01. Показов 531. Ответов 1
Метки нет (Все метки)

Author24 — интернет-сервис помощи студентам
Добрейший вечерочек!
Такая проблема: есть вывод справки, в которой есть таблица, но почему то она выводится в конце справки, хотя должна быть в центре, в чем ошибка?
PHP
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
mysql_connect("localhost", "root", "1") or die (mysql_error ());
mysql_select_db("bdpc") or die(mysql_error());
mysql_query("set names utf8");
$ppo = (int) $_GET['ppo'];
$query = "SELECT `cab` FROM pc WHERE `id` = $ppo";
$res = mysql_query($query) or die($query . '<br />' . mysql_error());
while ($row=mysql_fetch_assoc($res)) {
$cab = $row['cab'];
echo 
'<p align="right">УТВЕРЖДАЮ</br>
Директор</br>
_________Н.В. Зудов</br>
"__"_________201__г.</br>
</p></br>
<p align="center"><b>ПАСПОРТ</br>
программного обечсечения компьютерного класса
</b></p>
<p>Наименование структурного подразделения:________________________________</br>
Номер аудитории:<u><b>' .$cab. ' </b></u>
</p>';
echo
'<table border="1" align="center">
<tr><td align="center">
Инвентарный</br> номер</br> компьютера
</td>
<td align="center">
Наименование</br> программного</br> обеспечения
</td>
<td align="center">
Схема</br> лицензирования
</td>
<td align="center">
Номер</br>лицензии
</td></tr>';
}
$ppo = (int) $_GET['ppo'];
$query = "SELECT * FROM po WHERE `idpc` = $ppo";
$res = mysql_query($query) or die($query . '<br />' . mysql_error());
while ($row=mysql_fetch_assoc($res)) {
$name = $row['name'];
$key = $row['key'];
echo 
'<tr><td></td>
<td>'.$name.'</td>
<td></td>
<td>'.$key.'</td>
</tr>';
}
$ppo = (int) $_GET['ppo'];
$query = "SELECT * FROM pc WHERE `id` = $ppo";
$res = mysql_query($query) or die($query . '<br />' . mysql_error());
while ($row=mysql_fetch_assoc($res)) {
$position = $row['position'];
$familiya = $row['familiya'];
echo 
'<p>Ответственный за получение, распределение и установку ПО в структурном подразделении</br>
<u><b>'.$position.', &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ' .$familiya. ' &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp;</b></u></br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <small>(должность, подпись, расшифровка подписи, дата)</small></br></br>
Зам. директора по УПР___________________Н.В. Крутова</br>
</br>
Материально-ответственное лицо</br>
<u><b>'.$position.', &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ' .$familiya. ' &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp;</b></u></br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <small>(должность, подпись, расшифровка подписи, дата)</small></br>
</p>';
}
Добавлено через 32 минуты
Проблема решена
Но появилась другая:
PHP/HTML
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<!DOCTYPE HTML>
<html lang='ru' dir='ltr'>
<meta charset="utf-8" />
<head>
<title>Cлужебная записка</title>
</head>
<body>
<style>
table { 
border-collapse: collapse;
}
</style>
<table valign="top" align="center" width="800" height="1000" >
<tr><td valign="top">
<?php 
mysql_connect("localhost", "root", "1") or die (mysql_error ());
mysql_select_db("bdpc") or die(mysql_error());
mysql_query("set names utf8");
echo 
'<h2 align="left">СЛУЖЕБНАЯ ЗАПИСКА</h2></br>
<p align="left">Кому: Руководителю ОИТ С.В. Малышеву</br>
От кого:</br>
Дата:</br>
Тема: Об установке (изменении) ПО на компьютерах</br>
_______________________________________________________________________</br>
</br>
Довожу до Вашего сведения, что "___" __________ 201__г. было установлено </br>
(был изменен состав) ПО на следующих компьютерах:</br>
<table border="1"><tr><td>
Название подразделения
</td><td>
№ ауд.
</td><td>
Инв. номер компьютера
</td><td>
Вид операции
</td><td>
Название ПО
</td><td>
Схема лицензирования
</td><td>
Номер лцензии
</td><td>
МОЛ
</td></tr>';
$szpo = (int) $_GET['szpo'];
$query = "SELECT * FROM pc WHERE id = $szpo";
$res = mysql_query($query) or die($query . '<br />' . mysql_error());
while ($row=mysql_fetch_assoc($res)) {
$cab = $row['cab'];
echo 
'<tr>
<td></td>
<td>'.$cab.'</td>
<td></td>
<td></td>';
}
$szpo = (int) $_GET['szpo'];
$query = "SELECT * FROM po WHERE idpc = $szpo";
$res = mysql_query($query) or die($query . '<br />' . mysql_error());
while ($row=mysql_fetch_assoc($res)) {
$name = $row['name'];
$key = $row['key'];
'<td>'.$name.'</td>
<td></td>
<td>'.$key.'</td>';
}
$szpo = (int) $_GET['szpo'];
$query = "SELECT * FROM pc WHERE id = $szpo";
$res = mysql_query($query) or die($query . '<br />' . mysql_error());
while ($row=mysql_fetch_assoc($res)) {
$familiya = $row['familiya'];
$imya = $row['imya'];
$otchestvo = $row['otchestvo'];
$position = $row['position'];
echo
'<td>'.$familiya.''.$imya.''.$otchestvo.'</td>
</tr>';
}
echo 
'</table></br></br>Ответственный за получение, распределение и установку ПО в структурном</br>
подразделении
<u><b>'.$position.', &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ' .$familiya. ' &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp;</b></u></br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <small>(должность, подпись, расшифровка подписи, дата)</small></br></br>
<small align="center">(должность, подпись, расшифровка подписи, дата)</small>';
?>
</td></tr>
</table>
</body>
</html>
Эту справку выводит, но не отображает переменные, в чем проблема?
0
Programming
Эксперт
94731 / 64177 / 26122
Регистрация: 12.04.2006
Сообщений: 116,782
25.05.2016, 09:01
Ответы с готовыми решениями:

Как выводить таблицу после уже выведенного текста?
Всем здраствуйте! Есть такая проблема: из VB открываю новый Word документ и вставляю в него...

Помогите написать программу, которая вводит фактические данные в таблицу, и выводит на экран таблицу
Помогите написать программу, которая вводит фактические данные в таблицу, и выводит на экран...

Выводит адрес текста, вместо самого текста
#include &lt;iostream&gt; #include &lt;fstream&gt; #include &lt;cstring&gt; #include &lt;conio.h&gt; using namespace...

Не выводит таблицу
Доброго времени суток, уважаемые форумчани! Не понимаю, почему не выводится таблица по скрипту,...

1
44 / 40 / 13
Регистрация: 08.05.2016
Сообщений: 167
25.05.2016, 16:19 2
проверяй эти строки:
PHP
1
$szpo = (int) $_GET['szpo'];
Их зачем-то аж три
0
25.05.2016, 16:19
IT_Exp
Эксперт
87844 / 49110 / 22898
Регистрация: 17.06.2006
Сообщений: 92,604
25.05.2016, 16:19
Помогаю со студенческими работами здесь

Почему не выводит таблицу
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;...

Не выводит данные в таблицу
Коды все приложу. Проблема в том, если задействован IsInCircle, то орет Parse Error туда, а если...

Не выводит таблицу на форму
День добрый. В жаве я недавно и возник вот такой вопрос. Пользуюсь Eclipse. Создал проект. Добавил...

Не выводит таблицу в DataGridView
Программа делает вычисления и записывает вычисленный массив в виде таблицы в XML файл. Вычисления...


Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:
2
Ответ Создать тему
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2024, CyberForum.ru