-
Notifications
You must be signed in to change notification settings - Fork 0
/
updatetimeline.php
40 lines (28 loc) · 1016 Bytes
/
updatetimeline.php
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
<?php
$pageTitle = "Planet Money Refinance Timeline";
require_once('header.php');
$datenow = date('m/d/Y');
if ($_SERVER['REQUEST_METHOD'] == 'POST')
{
$error = UpdateTimeline();
}
?>
<form id="timeline" class="submitform" action="updatetimeline.php" method="post">
<table>
<tr><td>Event Date</td><td><input type="text" name="eventdate" value="<?=$datenow?>"/></td></tr>
<tr><td>Title</td><td><input type="text" name="title" /></td></tr>
<tr><td>Description</td><td><textarea rows=5 name="description"></textarea></td></tr>
<tr><td></td><td><input type="submit" name="submit" value="Save" style="float:right;"/></td></tr>
</table>
</form>
<?php
require("footer.php");
?>
<?php
function UpdateTimeline()
{
if (!SubmitTimelineEntry($_SESSION['user'], $_POST['title'], $_POST['description'], strtotime($_POST['eventdate'])))
$error = 'There was an error submitting your changes. Please try again.';
return $error;
}
?>