diff options
author | Joël Cox <joel@joelcox.nl> | 2011-10-10 20:24:46 +0200 |
---|---|---|
committer | Joël Cox <joel@joelcox.nl> | 2011-10-10 20:24:46 +0200 |
commit | c2b48812b1e1c3457ddaffb2fbbfcccb45554694 (patch) | |
tree | 643077cb064470455bc1dba546ec5261732f7ee0 /user_guide_src/source/tutorial/create_news_items.rst | |
parent | 3bf17fb1423283d79a81b6ec3ca6134566b28475 (diff) |
Fixed markup glitches from HTML to RST parser.
Diffstat (limited to 'user_guide_src/source/tutorial/create_news_items.rst')
-rw-r--r-- | user_guide_src/source/tutorial/create_news_items.rst | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/user_guide_src/source/tutorial/create_news_items.rst b/user_guide_src/source/tutorial/create_news_items.rst index 4a0056ada..003b94bd8 100644 --- a/user_guide_src/source/tutorial/create_news_items.rst +++ b/user_guide_src/source/tutorial/create_news_items.rst @@ -1,5 +1,6 @@ -Tutorial - Create news items -============================ +################# +Create news items +################# You now know how you can read data from a database using CodeIgnite, but you haven't written any information to the database yet. In this section @@ -15,16 +16,26 @@ with two fields, one for the title and one for the text. You'll derive the slug from our title in the model. Create the new view at application/views/news/create.php. -Create a news item ------------------- +:: + + <h2>Create a news item</h2> + + <?php echo validation_errors(); ?> + + <?php echo form_open('news/create') ?> + + <label for="title">Title</label> + <input type="input" name="title" /><br /> + + <label for="text">Text</label> + <textarea name="text"></textarea><br /> + + <input type="submit" name="submit" value="Create news item" /> -<?php echo validation\_errors(); ?> <?php echo form\_open('news/create') -?> Title - Text </textarea> - </form> + </form> There are only two things here that probably look unfamiliar to you: the -form\_open() function and the validation\_errors() function. +form_open() function and the validation_errors() function. The first function is provided by the `form helper <../helpers/form_helper.html>`_ and renders the form element and |