$const_name = $mysqli->query("SELECT users.*, consts.name const_name FROM users LEFT JOIN consts ON users.const_id = consts.name");
$users = $const_name->fetch_assoc();
$i = 1;
foreach($users as $row) {
$reg_date = $row[reg_date];
$gear = round(($row[dmg_awa] + $row[dmg_com]) / 2 + $row[def]) + $row[bonus_gear];
echo '<tr><form class="ad_form" method="POST">';
echo '<td class="field_counter">'.$i++.'</td>';
echo '<td><input type="text" value="'.$row[login].'" name="login" class="admin_form"><span style="display:none;">'.$row[login].'</span></td>';
//!!!!!!!!!!!!!!!!!!!!!!!!!!
echo '<td><input type="text" value="'.$row['const_name'].'" name="const_name" class="admin_form"><span style="display:none;">'.$row['const_name'].'</span></td>';
//!!!!!!!!!!!!!!!!!!!!!!!!!!!
echo '<td><input type="text" value="'.$row[nick].'" name="nick" class="admin_form"><span style="display:none;">'.$row[nick].'</span></td>';
echo '<td><input type="text" value="'.$row[real_name].'" name="real_name" class="admin_form"><span style="display:none;">'.$row[real_name].'</span></td>';
echo '<td>ff</td>';
echo '<td><input type="text" value="'.$row[vk_link].'" name="vk_link" class="admin_form"></td>';
echo '<td><input type="text" value="'.$row[lvl].'" name="lvl" class="admin_form cstm-wid_small"><span style="display:none;">'.$row[lvl].'</span></td>';
echo '<td class="cstm-wid">'.$row[klass].'</td>';
echo '<td class="statsad"><input type="text" value="'.$row[dmg_com].'" name="dmg_com" class="admin_form cstm-wid_small"><span style="display:none;">'.$row[dmg_com].'</span></td>';
echo '<td class="statsad"><input type="text" value="'.$row[dmg_awa].'" name="dmg_awa" class="admin_form cstm-wid_small"><span style="display:none;">'.$row[dmg_awa].'</span></td>';
echo '<td class="statsad"><input type="text" value="'.$row[def].'" name="def" class="admin_form cstm-wid_small"><span style="display:none;">'.$row[def].'</span></td>';
echo '<td class="statsad">'.$gear.'</td>';
echo '<td class="statsad del"><input type="text" value="'.$row[cp_lead].'" name="cp_lead" class="admin_form cstm-wid_small"></td>';
echo '<td class="statsad del"><input type="text" value="'.$row[activation].'" name="activation" class="admin_form cstm-wid_small"></td>';
echo '<td class="statsad" style="border:none;"><button class="adrecord"><i class="fa fa-check-circle"></i></button></td>';
echo '</form></tr>';
}
<td>
<input type="text" value=<?=$row['login'];?>" name="login" class="admin_form"><span style="display:none;"><?=$row['login'];?></span></td>';
<td><input type="text" value="'<?=$row['nick'];?>" name="nick" class="admin_form"><span style="display:none;"><?=$row['nick'];?></span></td>';
<table>
<?php foreach ($row as $item):?>
<tr>
<td><?=$item['name'];?></td>
</tr>
<?php endforeach; ?>
</table>
SELECT * FROM currency_codes
ORDER BY
CASE
WHEN code='USD' THEN 1
WHEN code='CAD' THEN 2
WHEN code='AUD' THEN 3
WHEN code='BBD' THEN 4
WHEN code='EUR' THEN 5
WHEN code='GBP' THEN 6
ELSE 7
END,name;
Но возможно, так как разработку ведешь один, будет удобнее использовать один репозиторий и для бека и для фронта.
Если хочется держать header в отдельном файле, то есть @include которую можно описать в том же layout