-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathregist.php
More file actions
36 lines (25 loc) · 820 Bytes
/
regist.php
File metadata and controls
36 lines (25 loc) · 820 Bytes
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
<?php
require_once('vendor/autoload.php');
require_once('sqlconnect.php');
use app\test;
use app\register;
if(isset($_POST['submit'])){
$regist = new register($_POST['username'], $_POST['password'], $_POST['email'], $mysqli);
$regist->newUser();
header("Location: login.php?loginStatus=newuser");
}
?>
<html>
<head>
<title>Registration</title>
</head>
<body>
<form action="regist.php" method="post">
<label>Username: </label><input type="text" name="username" placeholder="username"><br>
<label>Password: </label><input type="password" name="password" placeholder="password"><br>
<label>E-mail: </label><input type="email" name="email" placeholder="youremail"><br>
<button type="submit" name="submit">Register</button>
</form>
<a href="login.php">einloggen</a>
</body>
</html>