-
Notifications
You must be signed in to change notification settings - Fork 0
/
signup.php
45 lines (35 loc) · 1.05 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
<?php
include 'header.php';
?>
<?php
$url = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
if (strpos($url, 'error=empty') !== false){
echo "Fill out all fields!";
}
elseif (strpos($url, 'error=username') !== false){
echo "Username already exists!";
}
if (isset($_SESSION['id'])){
echo $_SESSION['id'];
} else {
echo "You are not logged in!";
}
?>
<br><br><br>
<?php
if (isset($_SESSION['id'])){
echo "You are already logged in!";
//header("Location: upload.php");
} else {
echo "<form action='includes/signup.inc.php' method='post'>
<input type='text' name='first' placeholder='Firstname'><br>
<input type='text' name='last' placeholder='Lastname'><br>
<input type='text' name='mail' placeholder='E-Mail'><br>
<input type='text' name='uid' placeholder='Username'><br>
<input type='password' name='pwd' placeholder='Password'><br>
<button type='submit'>SIGN UP</button><br>
</form>";
}
?>
</body>
</html>