$str = 'полная_строка_из_БД';
if (strlen($str) > 30) $str = substr($str, 0, 30) . '...';
echo $str;
$arr = [];
$show = false;
while ($hero2 = mysqli_fetch_assoc($hero1)) {
$time_now = strtotime($hero2['cron1']);
$time_need = strtotime($hero2['cron2']);
if ($time_need >= $time_now) {
$t_s = date("H:i ", 75600 - ($time_need - $time_now));
}
else {
$t_s = date("H:i ", 75600 - ($time_now - $time_need));
if (!$show) $show = true;
$arr[] = str_replace(":", ".", $t_s);
}
}
if ($show) {
echo '[' . implode(',', $arr) . ']';
}
mysqli_query($connect,"INSERT INTO sh_refers_refers (pid, name, page, priority) VALUES ('".$pid."', '".$_POST['name']."', '".$_POST['page']."', '0'");
...
$database_query = mysqli_query($database_connect, "SELECT * FROM `page_main` WHERE ID = 1");
...
name="nick"
а обработать пытаетесь $nick = $_POST['nicknames'];