-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate.php
More file actions
65 lines (58 loc) · 2.24 KB
/
update.php
File metadata and controls
65 lines (58 loc) · 2.24 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<html>
<head>
<title>NDPRO</title>
<h1> BIENVENUE SUR LE MENU DE MODIFICATION DE NOUVEL ORDINATEUR</h1>
<meta charset="UTF-8"/>
<link rel="stylesheet" href="crud.css"/>
</head>
<body>
<nav>
<img src="login.PNG" height="260" width="2000"/>
</nav>
<link rel="stylesheet" href="bootstrap.min.css">
<div style="width:400px; margin:auto">
<?php
try
{
$connexion = new PDO('mysql:host=localhost;dbname=gestion', 'root', '');
$requete="select * from ordinateur where id=".$_GET['id'];
$resultat=$connexion->query($requete);
foreach($resultat as $row){
?>
<form action="traitemodif.php" method="post">
<h3>Modifier Les Informations d'un Nouvel Ordinateur</h3>
<div class="row">
<div>
<div class="col">
<label class="grey" for="username">Entrez la marque de la voiture:</label>
<input class="form-control" type="text" name="Marque" id="username" value="<?php echo $row['Marque'] ; ?>" size="23" />
<input class="form-control" type="hidden" name="id" id="username" value="<?php echo $row['id'] ; ?>" size="23" />
</div>
<div>
<div class="col">
<label class="grey" for="username">Entrez le pods de la voiture:</label>
<input class="form-control" type="text" name="Poids" id="username" value="<?php echo $row['Poids'] ; ?>" size="23" />
</div>
<div>
<div class="col">
<label class="grey" for="username">Entrez le prix de la voiture :</label>
<input class="form-control" type="text" name="Prix" id="username" value="<?php echo $row['Prix'] ; ?>" size="23" />
</div>
<div>
<div class="col">
<label class="grey" for="username">Entrez la quantite de voiture disponible:</label>
<input class="form-control" type="text" name="Quantite" id="username" value="<?php echo $row['Quantite'] ; ?>" size="23" />
</div>
<br>
<div>
<div class="col">
<button type="submit" class="btn btn-warning">Enregister</button>
</div>
</div>
</form>
<?php
}
}catch (Exception $e){
die('Erreur : ' . $e->getMessage());
}?>
</div>