-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodifier.php
More file actions
35 lines (30 loc) · 986 Bytes
/
Copy pathmodifier.php
File metadata and controls
35 lines (30 loc) · 986 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
$bdd = new PDO('mysql:host=127.0.0.1;dbname=jingle', 'root', '');
$pdoStat = $bdd ->prepare('UPDATE eleve set nom=:nom, prenom=:prenom, classe=:classe, equipe=:equipe/*, passCrypte=:passCrypte*/ WHERE id=:num LIMIT 1');
$pdoStat ->bindValue(':num', $_POST['numContact'], PDO::PARAM_INT);
$pdoStat ->bindValue(':nom', $_POST['nom'], PDO::PARAM_STR);
$pdoStat ->bindValue(':prenom', $_POST['prenom'], PDO::PARAM_STR);
$pdoStat ->bindValue(':classe', $_POST['classe'], PDO::PARAM_INT);
$pdoStat ->bindValue(':equipe', $_POST['equipe'], PDO::PARAM_INT);
//$pdoStat ->bindValue(':passCrypte', $_POST['mdp'], PDO::PARAM_STR);
$executeIsOk = $pdoStat -> execute();
if ($executeIsOk)
{
$message = 'La Personne à été mis à jour';
}
else
{
$message = 'Une Erreur cest produite';
}
?>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>Modifier</title>
</head>
<body>
<h1>Modifier</h1>
<p><?= $message ?></p>
<a href="GestionEleves.php">Retour</a>
</body>
<html>