-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsignup.php
48 lines (45 loc) · 1.55 KB
/
signup.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
<!-- Sign up page -->
<?php
include_once 'header.php';
?>
<!-- form -->
<section class="signup-form">
<h2 class="hvdg">Registrer deg selv</h2>
<div class="signup-form-form">
<form action="includes/signup.inc.php" method="post">
<label for="name">Brukernavn</label>
<input type="text" name="name" placeholder="Brukernavn">
<label for="email">E-post</label>
<input type="text" name="email" placeholder="Email">
<label for="pwd">Passord</label>
<input type="password" name="pwd" placeholder="Passord">
<label for="pwd-repeat">Gjenta passord</label>
<input type="password" name="pwdrepeat" placeholder="Gjenta Passord">
<label for="notif">Varslinger</label>
<input type="hidden" name="notif" value="0">
<input type="checkbox" name="notif" value="1" checked>
<button type="submit" name="submit">Lag konto</button>
</form>
</div>
<?php
// Error messages
if (isset($_GET["error"])) {
if ($_GET["error"] == "emptyinput") {
echo "<p>Fyll ut alle feltene!</p>";
} else if ($_GET["error"] == "invalidemail") {
echo "<p>Skriv in riktig email!</p>";
} else if ($_GET["error"] == "passwordsdontmatch") {
echo "<p>Passord matcher ikke!</p>";
} else if ($_GET["error"] == "stmtfailed") {
echo "<p>Noe gikk galt!</p>";
} else if ($_GET["error"] == "emailtaken") {
echo "<p>Email er allerede registrert!</p>";
} else if ($_GET["error"] == "none") {
echo "<p>Du er nå registrert!</p>";
}
}
?>
</section>
<?php
include_once 'footer.php';
?>