-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnew-entry.php
More file actions
36 lines (27 loc) · 996 Bytes
/
new-entry.php
File metadata and controls
36 lines (27 loc) · 996 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>New entry</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container">
<?php
$result = $_GET['r'];
if ($result == 'created') {
echo '<h4 class="col-sm-4 col-sm-offset-4">Created new record succesfully</h4>';
} else if ($result == 'alreadyExists') {
echo '<h4 class="col-sm-4 col-sm-offset-4">This term already exists</h4>';
}
?>
<form action="db-new-entry.php" class="col-sm-4 col-sm-offset-4">
<h2 class="form-signin-heading">Fill in below</h2>
<input type="text" name="term" class="form-control" placeholder="Term" required autofocus>
<input type="text" name="result" class="form-control" placeholder="Result" required>
<button class="btn btn-lg btn-primary btn-block" type="submit">Place entry</button>
</form>
</div>
</body>
</html>