diff options
author | Jesse Morgan <jesse@jesterpm.net> | 2011-05-24 15:01:09 -0700 |
---|---|---|
committer | Jesse Morgan <jesse@jesterpm.net ; true> | 2011-05-24 15:01:09 -0700 |
commit | d69c19b7a138659962d3c20c2487f4f13da997c5 (patch) | |
tree | 2300eaa3ed16fd31b8e844df72bb49434298a2e8 /htdocs/new-post.php | |
parent | a1bbd6bfb8dd3812c70acdeff793cd9d78bdc219 (diff) |
Working on email validation
Diffstat (limited to 'htdocs/new-post.php')
-rw-r--r-- | htdocs/new-post.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/htdocs/new-post.php b/htdocs/new-post.php index 7312e5f..0d1556c 100644 --- a/htdocs/new-post.php +++ b/htdocs/new-post.php @@ -31,7 +31,7 @@ if (isset($_POST['category'])) { $error .= "<p>$desc is a required field.</p>"; } else { - $values[$field] = addslashes($_POST[$field]); + $values[$field] = trim($_POST[$field]); } } @@ -44,9 +44,11 @@ if (isset($_POST['category'])) { $post->setEmail($values['email']); $post->setCategory($values['category']); - $post->setTitle($values['title']); + $post->setName($values['title']); $post->setDescription($values['description']); + // TODO: Set the source of the post. + if ($post->save()) { $post->sendValidation(); |