This repository has been archived on 2022-10-26. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
biblio/editerClient.php
2019-02-11 10:24:07 +01:00

31 lines
No EOL
624 B
PHP

<?php
require_once "includes/bdd.php";
// Requête SQL édition client
$editerClient = $bdd->prepare("
UPDATE biblio_client
SET
nom = :nom,
prenom = :prenom,
sexe = :sexe,
adresse = :adresse,
cp = :cp,
ville = :ville,
tel = :tel,
mail = :mail
WHERE code = :code
");
// Tableau informations client
$infosClient = [];
// Stockage des infos dans tableau
foreach($_POST as $key => $value){
$infosClient[$key] = $value;
}
// Exécution de la requête
$editerClient->execute($infosClient);
// Redirection vers page client
header("Location: client.php?code=".$infosClient['code']);