From d69c19b7a138659962d3c20c2487f4f13da997c5 Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Tue, 24 May 2011 15:01:09 -0700 Subject: Working on email validation --- htdocs/new-post.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'htdocs/new-post.php') 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 .= "

$desc is a required field.

"; } 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(); -- cgit v1.2.3