<?php
include "databases.php";
$result = mysqli_query($induction, "SELECT * FROM `price`");
$floor = mysqli_query($induction, "SELECT * FROM `price` WHERE name_of_service = 'Полы'");
$door = mysqli_query($induction, "SELECT * FROM `price` WHERE name_of_service = 'Монтаж дверей и окон'");
$wall = mysqli_query($induction, "SELECT * FROM `price` WHERE name_of_service = 'Стены'");
$window = mysqli_query($induction, "SELECT * FROM `price` WHERE name_of_service = 'Откосы оконные, дверные'");
$color = mysqli_query($induction, "SELECT * FROM `price` WHERE name_of_service = 'Покраска'");
$water = mysqli_query($induction, "SELECT * FROM `price` WHERE name_of_service = 'Грунтовка и гидроизоляция'");
$top = mysqli_query($induction, "SELECT * FROM `price` WHERE name_of_service = 'Потолок'");
$arks = mysqli_query($induction, "SELECT * FROM `price` WHERE name_of_service = 'Криволинейные поверхности (арки, откосы, короба)'");
$noise = mysqli_query($induction, "SELECT * FROM `price` WHERE name_of_service = 'Тепло- и шумоизоляция стен'");
$corner = mysqli_query($induction, "SELECT * FROM `price` WHERE name_of_service = 'Фурнитура углов, плинтуса'");
$tube = mysqli_query($induction, "SELECT * FROM `price` WHERE name_of_service = 'Сантехнические работы'");
$power = mysqli_query($induction, "SELECT * FROM `price` WHERE name_of_service = 'Электромонтажные работы'");
?>
<?php while ($name = mysqli_fetch_assoc($color)) {
?><tr>
<td><?php echo $name['second_name_of_service'] ?></td>
<td><?php echo $name['price_of_service'] ?></td>
</tr><?php
};?>
<?php
$servername = "127.0.0.1";
$database = "name";
$username = "login";
$password = "password";
$induction = mysqli_connect($servername, $username, $password, $database);
if ($induction == false){
echo "Ошибка подключения";
}
?>
Можно даже буквально так и писать
newCommentImg.id = 'новый_айди';
, но автор вопроса настолько не хочет ничего самостоятельно делать, что доходит до абсурда.
newCommentHeader.append(newCommentImg);
newCommentImg.classList.add('comment__img');
newCommentImg.setAttribure('id', 'новый_айди');
let commentForm = document.querySelector('.comments__form');
let commentsList = document.querySelector('.comments__list');
let commentName = document.querySelector('.name');
let commentField = document.getElementById('comment');
let commentEmail = document.querySelector('.email');
commentForm.onsubmit = function (evt) {
evt.preventDefault();
let newComment = document.createElement('li');
let newCommentHeader = document.createElement('div');
let newCommentInner = document.createElement('div');
let newCommentImg = document.createElement('img');
let newCommentName = document.createElement('span');
let newCommentText = document.createElement('span');
commentsList.append(newComment);
newComment.append(newCommentHeader);
newCommentHeader.classList.add('comment__header');
newCommentHeader.append(newCommentImg);
newCommentImg.classList.add('comment__img');
newCommentImg.setAttribure('id', 'новый_айди');
newCommentHeader.append(newCommentName);
newCommentName.classList.add('comment__name');
newCommentName.textContent = commentName.value;
newComment.append(newCommentInner);
newCommentInner.classList.add('comment__inner');
newCommentInner.append(newCommentText);
newCommentText.classList.add('comment__text');
newCommentText.textContent = commentField.value;
commentField.value = '';
commentName.value = '';
commentEmail.value = '';
};
let commentForm = document.querySelector('.comments__form');
let commentsList = document.querySelector('.comments__list');
let commentName = document.querySelector('.name');
let commentField = document.getElementById('comment');
let commentEmail = document.querySelector('.email');
commentForm.onsubmit = function (evt) {
evt.preventDefault();
let newComment = document.createElement('li');
let newCommentHeader = document.createElement('div');
let newCommentInner = document.createElement('div');
let newCommentImg = document.createElement('img');
let newCommentName = document.createElement('span');
let newCommentText = document.createElement('span');
commentsList.append(newComment);
newComment.append(newCommentHeader);
newCommentHeader.classList.add('comment__header');
newCommentHeader.append(newCommentImg);
newCommentImg.classList.add('comment__img');
newCommentHeader.append(newCommentName);
newCommentName.classList.add('comment__name');
newCommentName.textContent = commentName.value;
newComment.append(newCommentInner);
newCommentInner.classList.add('comment__inner');
newCommentInner.append(newCommentText);
newCommentText.classList.add('comment__text');
newCommentText.textContent = commentField.value;
commentField.value = '';
commentName.value = '';
commentEmail.value = '';
};