alpha_full/pages/clients/client.reqInsert.php
2026-04-06 22:58:51 +02:00

38 lines
1.4 KiB
PHP
Executable File

<?php
$erreurSql=0;
$newHash = password_hash($pwd, PASSWORD_DEFAULT);
$reqInsert = "
INSERT INTO clients (idMail, pwd, civ, nom, prenom, tel, dateNaiss, idModeLiv, idModePaie, txRemiseCli, dateInsc, dateModif, news, statut, lgCli, cle )
VALUES ( :idMail, :pwd, :civ, :nom, :prenom, :tel, :dateNaiss, :idModeLiv, :idModePaie, 1, :dateInsc, :dateModif, :news, 0, :lgCli, :cle ) ";
if (isset($debug[2]) && $debug[2] == '1') {
$debugMsg .= monDebug(2, [ 'reqInsert' => $reqInsert ], 'client.reqInsert.php' );
}
try {
$resConn = $idPdo->prepare($reqInsert);
$resConn->execute([
':idMail' => $idMail,
':pwd' => $newHash,
':civ' => $civ,
':nom' => $nom,
':prenom' => $prenom,
':tel' => $tel,
':dateNaiss' => $dateNaiss,
':idModeLiv' => $idModeLivCli,
':idModePaie' => $idModePaieCli,
':dateInsc' => $today,
':dateModif' => $today,
':news' => $news,
':lgCli' => $lg,
':cle' => $cle
]);
}
catch (PDOException $e) {
if (!isset($contactMsg[45])) { include_once($includePath . "/req/13-init.contactMsgList.php");}
$usrSiteMsg .= 'Erreur dans la requête ! Veuillez contacter ' . strip_tags($contactMsg[45]);
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug( 2, [ 'Erreur' => $e->getMessage() ], 'client.reqInsert.php' ); }
$erreurSql=1;
//die();
}
?>