$num = $_GET['num']; //
$res = mysqli_query($connection, "SELECT * FROM `videos` ORDER BY `id` DESC LIMIT $num, 20");
mysqli_query($connection,"INSERT INTO `comment` (`name`,`text_comment`,`date`,`page_id`) VALUES('".$_POST['name']."','".$_POST['text']."', NOW(), '".$vidos['id']."')"); //
$num = intval($_GET['num']);