-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaccount.php
57 lines (43 loc) · 2.7 KB
/
account.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
46
47
48
49
50
51
52
53
54
55
56
57
<?php
session_start();
if(!isset($_SESSION['gebruiker'])){
header('Location: index.php');
}
require_once 'includes/core.php';
$dbh = DatabaseConnect();
$huidigeGebruiker = $_SESSION['gebruiker'];
$selectQueryAccount = $dbh->prepare("SELECT * FROM GEBRUIKER WHERE GEBRUIKERSNAAM = :gebruiker");
$selectQueryAccount->execute([':gebruiker' => $huidigeGebruiker]);
$row = $selectQueryAccount->fetch();
$html = "<div>";
$html .= "<ul class = 'accountinfo'><li class = 'accountinfoKop'>Gebruikersnaam</li><li class = 'accountinfoData'>" . $row['GEBRUIKERSNAAM'] . "</li></ul>";
$html .= "<ul class = 'accountinfo'><li class = 'accountinfoKop'>Aanhef</li><li class = 'accountinfoData'>" . ($row['SEXE'] == 'M' ? 'Dhr.' : 'Mvr.') . "</li></ul>";
$html .= "<ul class = 'accountinfo'><li class = 'accountinfoKop'>Voornaam</li><li class = 'accountinfoData'>" . $row['VOORNAAM'] . "</li></ul>";
$html .= "<ul class = 'accountinfo'><li class = 'accountinfoKop'>Tussenvoegsels</li><li class = 'accountinfoData'>" . $row['TUSSENVOEGSEL'] . "</li></ul>";
$html .= "<ul class = 'accountinfo'><li class = 'accountinfoKop'>Achternaam</li><li class = 'accountinfoData'>" . $row['ACHTERNAAM'] . "</li></ul>";
$html .= "<ul class = 'accountinfo'><li class = 'accountinfoKop'>Geboortedatum</li><li class = 'accountinfoData'>" . $row['GEBOORTEDATUM'] . "</li></ul>";
$html .= "<ul class = 'accountinfo'><li class = 'accountinfoKop'>Telefoon</li><li class = 'accountinfoData'>" . $row['TELEFOON'] . "</li></ul>";
$html .= "<ul class = 'accountinfo'><li class = 'accountinfoKop'>Straatnaam</li><li class = 'accountinfoData'>" . $row['STRAATNAAM'] . "</li></ul>";
$html .= "<ul class = 'accountinfo'><li class = 'accountinfoKop'>Huisnummer</li><li class = 'accountinfoData'>" . $row['HUISNUMMER'] . "</li></ul>";
$html .= "<ul class = 'accountinfo'><li class = 'accountinfoKop'>Postcode</li><li class = 'accountinfoData'>" . $row['POSTCODE'] . "</li></ul>";
$html .= "<ul class = 'accountinfo'><li class = 'accountinfoKop'>Woonplaats</li><li class = 'accountinfoData'>" . $row['WOONPLAATS'] . "</li></ul>";
$html .= "<ul class = 'accountinfo'><li class = 'accountinfoKop'>Email</li><li class = 'accountinfoData'>" . $row['EMAIL'] . "</li></ul>";
$html .= "<ul class = 'accountinfo'><li class = 'accountinfoKop'>Nieuwsbrief</li><li class = 'accountinfoData'>" . ($row['NIEUWSBRIEF'] < 1 ? 'Nee' : 'Ja') . "</li></ul>";
$html .= "</div>";
?>
<!DOCTYPE html>
<html lang="nl">
<head>
<?php require_once 'includes/head.html'; ?>
<title>FairFood | Uw account</title>
</head>
<body>
<?php include 'includes/header.php'; ?>
<main>
<h1>Account</h1>
<?=$html?>
<p><a href="signout.php">Uitloggen</a></p>
</main>
<?php include 'includes/footer.html'; ?>
</body>
</html>