-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathajoutclient.php
More file actions
86 lines (86 loc) · 2.89 KB
/
ajoutclient.php
File metadata and controls
86 lines (86 loc) · 2.89 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php
if (isset($_POST['btnsave'])) {
$fname= $_POST['nom'];
$lname= $_POST['prenom'];
$pnumber= $_POST['phone'];
$email= $_POST['email'];
$password= $_POST['pass'];
$localisation=$_POST['ville'];
$client = $db->query('SELECT * from client')->fetchAll(PDO::FETCH_OBJ);
$size3 = sizeof($client);
$q="INSERT INTO client (Id, nom, prenom, telephone, localisation, email, password) VALUES ($size3+1, '$fname', '$lname', '$pnumber', '$localisation', '$email', '$password')";
$db->exec($q);
echo('good');}
?>
<center>
<div class="tm-block-col tm-col-account-settings">
<div class="tm-bg-primary-dark tm-block tm-block-settings">
<h2 class="tm-block-title">Client</h2>
<form action="" class="tm-signup-form row" method="POST">
<div class="form-group col-lg-6">
<label for="name">Name</label>
<input
id="nom"
name="nom"
type="text"
class="form-control validate"
/>
</div>
<div class="form-group col-lg-6">
<label for="email">Email</label>
<input
id="email"
name="email"
type="email"
class="form-control validate"
/>
</div>
<div class="form-group col-lg-6">
<label for="password">Password</label>
<input
id="pass"
name="pass"
type="password"
class="form-control validate"
/>
</div>
<div class="form-group col-lg-6">
<label for="password2">Localisation</label>
<input
id="localisation"
name="ville"
type="text"
class="form-control validate"
/>
</div>
<div class="form-group col-lg-6">
<label for="phone">Phone</label>
<input
id="phone"
name="phone"
type="tel"
class="form-control validate"
/>
</div>
<div class="form-group col-lg-6">
<label for="password2">Prenom</label>
<input
id="prenom"
name="prenom"
type="text"
class="form-control validate"
/>
</div>
<div class="col-12">
<button
name="btnsave"
type="submit"
class="btn btn-primary btn-block text-uppercase"
>
Create a Client
</button>
</div>
</form>
</div>
</div>
</center>