-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathadd.php
More file actions
52 lines (52 loc) · 1.54 KB
/
add.php
File metadata and controls
52 lines (52 loc) · 1.54 KB
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
49
50
51
52
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
</head>
<body>
<?php
if (isset($_POST['asubmit'])){
require_once 'UserInterface.php';
$ui = new UserInterface();
$return = $ui->postData();
if ($return == 0)
{
echo "<h2 align=center>An error occurred</h2>";
}
else if($return == -1)
{
echo "<h2 align=center>Login Failure</h2>";
}
else
{
echo "<h2 align=center>Success</h2>";
}
//unset($_POST['asubmit']);
}else{
?>
<div id="top">
<h1 align="center">Add Book</h1>
</div>
<form action="add.php" method="POST">
<table align="center">
<tbody>
<tr>
<td>Admin's username</td><td><input type="text" name="username" style=width:8em;></td>
<td>Password</td><td><input type="password" name="password" style=width:8em;></td>
<td>ISBN</td><td><input type="text" name="isbn" style=width:8em;></td>
<td><input type="submit" name="asubmit" value="Enter"></td>
</tr>
</tbody>
</table>
</form>
<?php
}
?>
<br><p align="center"><a href="main.php">Return to Main Page</a>
</body>
</html>