prepare( $query ); $queryRequest->bindParam( ':num_eta', $_SESSION['cfa_num'], PDO::PARAM_INT ); $queryRequest->bindParam( ':myIdCap', $myIdCap, PDO::PARAM_INT ); $queryRequest->execute(); $data=$queryRequest->fetchAll(); $count = $queryRequest->rowCount(); if($count!=1){ header('location:index-cfa.php'); exit(); } $nom_cap = decrypter($maCleDeCryptage,$data[0]['nom_cap']).' '.decrypter($maCleDeCryptage,$data[0]['prenom_cap']); //Ajout ou Modification if(!empty($_POST['idCoLy'])) $idCoLy = $_POST['idCoLy']; else $idCoLy = ""; $etaCoLy = $nomCoLy = $prenomCoLy = $fonctionCoLy = $telCoLy = $emlCoLy = $adresse1CoLy = $adresse2CoLy = $cpCoLy = $villeCoLy = $nbClasses = $nbEleves = $commentCoLy = ""; $btnSub = 'Ajouter'; $txtIntro = 'Inscription'; if(!empty($idCoLy)){ $query="select * from collegelycee where idCoLy=:idCoLy"; $queryRequest = $db->prepare( $query ); $queryRequest->bindParam( ':idCoLy', $idCoLy, PDO::PARAM_INT ); $queryRequest->execute(); $dataCoLy=$queryRequest->fetchAll(); $etaCoLy = decrypter($maCleDeCryptage,$dataCoLy[0]['etaCoLy']); $nomCoLy = decrypter($maCleDeCryptage,$dataCoLy[0]['nomCoLy']); $prenomCoLy = decrypter($maCleDeCryptage,$dataCoLy[0]['prenomCoLy']); $fonctionCoLy = decrypter($maCleDeCryptage,$dataCoLy[0]['fonctionCoLy']); $telCoLy = decrypter($maCleDeCryptage,$dataCoLy[0]['telCoLy']); $emlCoLy = decrypter($maCleDeCryptage,$dataCoLy[0]['emlCoLy']); $adresse1CoLy = decrypter($maCleDeCryptage,$dataCoLy[0]['adresse1CoLy']); $adresse2CoLy = decrypter($maCleDeCryptage,$dataCoLy[0]['adresse2CoLy']); $cpCoLy = decrypter($maCleDeCryptage,$dataCoLy[0]['cpCoLy']); $villeCoLy = decrypter($maCleDeCryptage,$dataCoLy[0]['villeCoLy']); $nbClasses = $dataCoLy[0]['nbClasses']; $nbEleves = $dataCoLy[0]['nbEleves']; $commentCoLy = decrypter($maCleDeCryptage,$dataCoLy[0]['commentCoLy']); $btnSub = 'Modifier'; $txtIntro = 'Modification'; } ?>