<?php
session_start();
$koneksi = mysqli_connect("localhost", "root", "", "membership");
if (isset($_POST['save_multicheckbox'])) {

    $pesertalist = $_POST['pesertaslist'];
    $xyz = implode(", ", $pesertalist);
    $query = "UPDATE lomba set peserta='$xyz'";
    $konek = mysqli_query($koneksi, $query);

    if ($konek) {
        header("Location: datalombacch.php");
    }

}
?>