open('mysqlitedb.db'); } } $db = new MyDB(); $colonne=""; if(isset($_POST['case'])){ if($_POST['case']=='1'){ $colonne='un'; } elseif ($_POST['case']=='2'){ $colonne='deux'; } elseif ($_POST['case']=='3'){ $colonne='trois'; } elseif ($_POST['case']=='4'){ $colonne='quatre'; } elseif ($_POST['case']=='5'){ $colonne='cinq'; } elseif ($_POST['case']=='6'){ $colonne='six'; } elseif ($_POST['case']=='7'){ $colonne='sept'; } elseif ($_POST['case']=='8'){ $colonne='huit'; } elseif ($_POST['case']=='9'){ $colonne='neuf'; } else{ $colonne='null'; } } $valeur=""; if(isset($_POST['forme'])){ $valeur=$_POST['forme']; } header("refresh: 2"); //$db->exec('CREATE TABLE partie(Id STRING,un STRING,deux STRING,trois STRING, quatre STRING,cinq STRING,six STRING,sept STRING,huit STRING,neuf STRING)'); $idpartie = "BQANQsS"; if(isset($colonne)and $valeur!="" and $colonne!=''){ $aff=$db->query('SELECT "'.$colonne.'" FROM partie where Id="'.$idpartie.'" '); $res = $aff->fetchArray(); if(strlen($res[$colonne])==1){ echo "
Insertion impossible une valeur est déjà à l'intérieur
$un | $deux | $trois |
$quatre | $cinq | $six |
$sept | $huit | $neuf |