-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
45 lines (39 loc) · 1.47 KB
/
index.php
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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Immo app</title>
</head>
<body style="background-color: antiquewhite">
<div style="position: fixed; left: 0px; top: 0px; width: 100%; height: 50px; background-color: lightskyblue">
<div style="float: left;">
<ul>
<li style="padding-left: 5px; padding-right: 30px; float: left; display: inline-block">Accueil</li>
<li style="padding-left: 5px; padding-right: 30px; float: left; display: inline-block">Locataires</li>
<li style="padding-left: 5px; padding-right: 30px; float: left; display: inline-block">Immobiliers</li>
</ul>
</div>
</div>
<div style="position: fixed; top: 50px">
<?php
include 'db-settings.php';
//execute the SQL query and return records
$result = mysql_query("SELECT id, firstname, lastname, role FROM user");
//fetch tha data from the database
while ($row = mysql_fetch_array($result)) {
echo $row['id'] . " - " . $row['firstname'] . " - " . $row['lastname'] . " - " . $row['role'] . "<br>";
}
?>
<form action="add-user.php">
<input type="text" name="firstname" placeholder="Votre prenom" />
<input type="phone" name="lastname" placeholder="Votre nom" />
<select name="role">
<option value="SIMPLE">Simple User</option>
<option value="SUPER">Compte premium</option>
<option value="ADMIN">Compte admin</option>
</select>
<input type="submit" value="Enregistrer" />
</form>
</div>
</body>
</html>