summaryrefslogtreecommitdiff
path: root/htdocs/new-post.php
diff options
context:
space:
mode:
authorJesse Morgan <jesse@jesterpm.net>2011-06-03 11:47:10 -0700
committerJesse Morgan <jesse@jesterpm.net ; true>2011-06-03 11:47:10 -0700
commit8e63ec327f9505aac31a9608d16a1f602289f9df (patch)
treee961413125e361ce7fd0d39bdc78661061dfa952 /htdocs/new-post.php
parent26f071d6cca5c3a8b9f3b18aa010f2d98236f804 (diff)
Added location field
Diffstat (limited to 'htdocs/new-post.php')
-rw-r--r--htdocs/new-post.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/htdocs/new-post.php b/htdocs/new-post.php
index 273e864..8573bce 100644
--- a/htdocs/new-post.php
+++ b/htdocs/new-post.php
@@ -136,6 +136,7 @@ function finish_post() {
$required = array(
'title' => 'Title',
+ 'location' => 'Location',
'description' => 'Description',
'email' => 'Email Address',
'email2' => 'Confirm Email Address',
@@ -161,6 +162,7 @@ function finish_post() {
$post->setEmail($values['email']);
$post->setName($values['title']);
$post->setDescription($values['description']);
+ $post->setLocation($values['location']);
if ($post->save()) {
return true;
@@ -288,6 +290,7 @@ require_once "src/footer.inc.php";
function render_form($error="") {
$title = isset($_POST['title']) ? $_POST['title'] : '';
+ $location = isset($_POST['location']) ? $_POST['location'] : '';
$description = isset($_POST['description']) ? $_POST['description'] : '';
$email = isset($_POST['email']) ? $_POST['email'] : '';
$email2 = isset($_POST['email2']) ? $_POST['email2'] : '';
@@ -298,6 +301,8 @@ function render_form($error="") {
echo "<p><label>Title: <input type=\"text\" name=\"title\" value=\"$title\" /></label></p>";
+ echo "<p><label>Location: <input type=\"text\" name=\"location\" value=\"$location\" /></label></p>";
+
echo "<p><label for=\"desc\">Description:</label></p>";
echo "<p><textarea name=\"description\" id=\"desc\" rows=\"10\""
. " cols=\"80\">$description</textarea></p>";