-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
43 lines (30 loc) · 844 Bytes
/
Copy pathindex.php
File metadata and controls
43 lines (30 loc) · 844 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
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
session_start();
require 'includes/mysql_connect.php';
include 'includes/functions.php';
if (isset($_POST['login']))
{
die(json_encode(login($_POST['user'], $_POST['pass'])));
}
if (isset($_POST['register']))
{
die(register($_POST['user'], $_POST['pass']));
}
?>
<!DOCTYPE html>
<html>
<head>
<title>LOGIN</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<form method="POST">
<label>User Name</label>
<br><input type="text" name="user" placeholder="User Name"></input><br>
<label>Password</label>
<br><input type="password" name="pass" placeholder="Password"></input><br>
<br><button name="login">Login</button><br>
<br><button name="register">Register</button><br>
</form>
</body>
</html>