<?php
session_start();
require_once "ConnexionBDD.php";
//Actualisation de l'IDpartie
$idparte = $_SESSION['idpartie'];
echo "<div id='iddelapartie' <h2 id='ids'>Identifiant partie : </h2>";
echo "<input type='text' value='$idparte' id='Monidpartie'>";
echo "<button onclick='MaFonction()'>Copier identifiant</button> </div>";


$db=new MyDB();
$afficher = $db->query('SELECT * FROM partieCartes where IdPartie="'.$idparte.'" ');
$tableau =[];
while ($row = $afficher->fetchArray()) {
    $un=$row['colUn'];
    $deux=$row['colDeux'];
    $trois=$row['colTrois'];
    $tout=$un.','.$deux.','.$trois;
   // $entier=$entier+1;
    array_push($tableau,$tout);
}

foreach ($tableau as $val) {
    //echo "<h2 class='contientphp'> $val d</h2>";
}
$comma_separated = implode(",", $tableau);
$_SESSION['listecartebdd']=$comma_separated;