-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathcreateQuote.php
More file actions
50 lines (40 loc) · 1.47 KB
/
Copy pathcreateQuote.php
File metadata and controls
50 lines (40 loc) · 1.47 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
<?php
$page_title = 'Create a Quote';
$nav_selected = "LIST";
$left_buttons = "NO";
$left_selected = "";
if (isset($_POST["quote"])) {
require_once "./initialize.php";
$success = create_quote($_POST["author"], $_POST["topic"], $_POST["quote"]);
if ($success) {
redirect_to('./admin.php?create=Success');
} else {
redirect_to('./admin.php?create=Failure');
}
}
include("./nav.php");
?>
<form action="createQuote.php" method="POST" enctype="multipart/form-data">
<br>
<h3 id="title">Create A Quote</h3> <br>
<table>
<tr>
<td style="width:100px">Author:</td>
<td><input type="text" name="author" class="form-control" maxlength="50" size="50" required title="Please enter an author."></td>
</tr>
<tr>
<td style="width:100px">Topic:</td>
<td><input type="text" name="topic" class="form-control" maxlength="50" size="50" required title="Please enter a topic."></td>
</tr>
<tr>
<td style="width:100px">Quotation:</td>
<td><input type="text" name="quote" class="form-control" maxlength="300" size="200" required title="Please enter a quote."></td>
</tr>
</table>
<br><br>
<div align="center" class="text-left">
<button type="submit" name="submit" class="btn btn-primary btn-md align-items-center">Create Quote</button>
</div>
<br> <br>
</form>
</div>