Form: Add an article to a database

I want to create a simple form that allows a user to post an article to a database reload the page with a cleared form and a list of the posted articles as clickable links for editing.
Each time a user adds a new article, its title appears on the list clickable for editing.

Heres an example of the layout.


<h3>List of articles available to edit</h3>
 <ol>
  <li><a href="form filled in with articles data">First Article title</a></li>
  <li><a href="form filled in with articles dat">Second Article title</a></li>
  <li><a href="form filled in with articles dat">Third Article title</a></li>
 </ol>

<fieldset>
 <legend>Add Article</legend>
  <form>
   <label>Article Title</label><input type="text" size="20" /><br />
   <label>Article Body</label><textarea cols="20" rows="7" /><br />
   <input type="submit" value="add article">
  </form>
</fieldset>

I can get the form to insert to the database fine but i cant get the page to reload with the added article appear as a link above the form.

All help would be much appreciated.

Thanks
Steven

Do the database insert, then do a second query to pull all the records to display on your page. I’d use the ID column for the link to edit that row.

I’d probably have one page with all the existing stuff, then an “add new” link. Have the form on a separate page, so when you click a link, the form on the edit page gets populated. If you click “add new” you just get the edit page with a blank form.