You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
535 B
19 lines
535 B
<?php
|
|
require "ConnexionBDD.php";
|
|
session_start();
|
|
$db=new MyDB();
|
|
|
|
$cartes=$_POST['cartestables'];
|
|
$_SESSION['cartestables']=$cartes;
|
|
$idpartie = $_SESSION['idpartie'];
|
|
|
|
$tableau = $cartes;
|
|
for ($i = 0; $i <= 15; $i++) {
|
|
$valcol1= substr($tableau[$i],-25,7);
|
|
$valcol2= substr($tableau[$i],-14,7);
|
|
$valcol3= substr($tableau[$i],-7);
|
|
|
|
$update = $db->query('UPDATE partieCartes SET "colUn" = "'.$valcol1.'","colDeux"="'.$valcol2.'","colTrois"="'.$valcol3.'" where IdPartie="'.$idpartie.'" AND IdCarte="'.($i+1).'" ');
|
|
}
|
|
|