par
nestor94 » 03 oct. 2021, 16:46
Puisque le test avec if (!empty($_POST)) m'affiche bien la variable, j'ai mis cela:
if (!empty($_POST)) {
$msg_nom_ville = filter_input(INPUT_POST, 'msg_nom_ville', FILTER_SANITIZE_STRING);
if(strlen($msg)>0){
$pdostat = $bdd->prepare("UPDATE map INNER JOIN membres ON membres.pos_x = map.pos_x AND membres.pos_y = map.pos_y SET map.msg_nom_ville = '$msg_nom_ville', tile= '/relief/tile_ville.gif' WHERE membres.id=:id");
$pdostat->bindvalue(':id', $idMembreSession, PDO::PARAM_INT);
$pdostat->execute();
}
header('Location:page_test.html');
exit;
}
Mais il n'y a pas de mise à jour de la table.
Puisque le test avec if (!empty($_POST)) m'affiche bien la variable, j'ai mis cela:
[PHP]
if (!empty($_POST)) {
$msg_nom_ville = filter_input(INPUT_POST, 'msg_nom_ville', FILTER_SANITIZE_STRING);
if(strlen($msg)>0){
$pdostat = $bdd->prepare("UPDATE map INNER JOIN membres ON membres.pos_x = map.pos_x AND membres.pos_y = map.pos_y SET map.msg_nom_ville = '$msg_nom_ville', tile= '/relief/tile_ville.gif' WHERE membres.id=:id");
$pdostat->bindvalue(':id', $idMembreSession, PDO::PARAM_INT);
$pdostat->execute();
}
header('Location:page_test.html');
exit;
}
[/PHP]
Mais il n'y a pas de mise à jour de la table.