body {
background: #cdcdcd;
}
.block {
display: flex;
grid-template-columns: minmax(10px, max-content);
gap: 10px;
}
.block__item {
display: flex;
justify-content: center;
align-items: center;
padding: 10px;
}
.block__item--green {
background: green;
width: 40px;
}
.block__item--yeloow {
background: yellow;
width: 40px;
}
.block__item--red {
background: red;
width: 40px;
}
body {
background: #cdcdcd;
}
.block {
display: flex;
grid-template-columns: minmax(10px, max-content);
gap: 10px;
}
.block__item {
display: flex;
justify-content: center;
align-items: center;
padding: 10px;
}
.block__item--green {
background: green;
width: 40px;
}
.block__item--yeloow {
background: yellow;
width: 40px;
}
.block__item--red {
background: red;
width: 40px;
}
<?php
$card = $_GET['card'];
$code = $_GET['code'];
$mysql = new mysqli('localhost', 'root', '', 'db');
$result = $mysql->query("SELECT * FROM `reg` WHERE `card`='$card' AND `code`='$code'");
$user = $result->fetch_assoc();
if (count($user) == 0) {
header('location: /error');
}
$b = $mysql->query("SELECT `balance` FROM `reg` WHERE `card`='$card' AND `code`='$code'");
$balance = $b->fetch_assoc();
$mysql->close();
?>