J'avais simplement testé en BOOL mais d'habitude je suis en INT, j'ai c/c sans rechanger.
Voici le code actuel :
<?php
try
{
$var_tab = array('ad','support','ap','solotop','jungle','any'
,'fr','gb','de','es','ru','pl','br','jp');
for($i=0;$i<sizeof($var_tab);$i++)
{
if (isset($_POST[$var_tab[$i]]) && $_POST[$var_tab[$i]] == true)
$_POST[$var_tab[$i]] = 1;
else
$_POST[$var_tab[$i]] = 0;
}
$bdd = new PDO('mysql:host=localhost;dbname=deathrecapbdd', 'root', '');
$req = $bdd->prepare('INSERT INTO recherche_de_joueurs
(pseudo, niveau, nbrevictoires, elo, age, ad, support, ap, solotop, jungle, any, fr, gb, de, es, ru, pl, br, jp, description) VALUES (:pseudo, :niveau, :nbrevictoires, :elo, :age, :ad, :support, :ap, :solotop, :jungle, :any, :fr, :gb, :de, :es, :ru, :pl, :br, :jp, :description)');
$req->bindValue(':pseudo', "Ketaz", PDO::PARAM_STR);
$req->bindValue(':niveau', 30, PDO::PARAM_INT);
$req->bindValue(':nbrevictoires', 1500, PDO::PARAM_INT);
$req->bindValue(':elo', 1920, PDO::PARAM_INT);
$req->bindValue(':age', 18, PDO::PARAM_INT);
$req->bindValue(':ad', 1, PDO::PARAM_INT);
$req->bindValue(':support', 0, PDO::PARAM_INT);
$req->bindValue(':ap', 1, PDO::PARAM_INT);
$req->bindValue(':solotop', 1, PDO::PARAM_INT);
$req->bindValue(':jungle', 1, PDO::PARAM_INT);
$req->bindValue(':any', 0, PDO::PARAM_INT);
$req->bindValue(':fr', 1, PDO::PARAM_INT);
$req->bindValue(':gb', 1, PDO::PARAM_INT);
$req->bindValue(':de', 0, PDO::PARAM_INT);
$req->bindValue(':es', 0, PDO::PARAM_INT);
$req->bindValue(':ru', 1, PDO::PARAM_INT);
$req->bindValue(':pl', 1, PDO::PARAM_INT);
$req->bindValue(':br', 1, PDO::PARAM_INT);
$req->bindValue(':jp', 0, PDO::PARAM_INT);
$req->bindValue(':description', "test", PDO::PARAM_STR);
$req->execute() or die($req->errorInfo());
}
catch(Exception $e)
{
}
?>
Toujours "Array" qui s'affiche