Insert / Update with the RTE editor

This tutorial will desribe how to build an Insert / Update page using the RTE editor
  Contents  
Prev Insert Next

Here is my fictional database setup; I have a table with the following fields:

We'll be using the RTE editor to insert the "forename" and "surname" and content from the wysiwyg part into the "Content" field.

First I need to setup my connection in Dreamweaver , I wont be showing you this here, you'll just have to follow the tutorial in Dreamweavers help files if you dont know how to setup a connection.

I'm gonna create the Insert page using dreamweaver, I can do it in any of the available scripting languages, it doesnt really matter to the RTE editor whether its ASP, PHP COLDFUSION or whatever.

IMPORTANT: Version 1.0.0 of the editor inserts the form without a name attribute which dreamweaver doesn't recognise when setting up an Insert/Update, either give the form a name like this:

Before
After

Call the form "theForm" (watch case) OR you can download version 1.0.1 of the extension which inserts the form with a name (bit pointless for such a minor change, but its up to you).

Now I am going to create my insert, first select Insert Record from the server behaviours box, and set up the insert behaviour

As you can see "forename" inserts into the forename column, "surname" into the surname column, and "text" (which is the wysiwyg area) inserts into the content field.

Now this is setup I am going to test it, I preview the page and perform an insert:

After I click the "Save Icon", a record is inserted into the database.

How cool is that!.

Now lets do an update.

  Contents  
Prev Insert Next

 

 

 

 

Bill Chalmers

Bill ChalmersStarted doing sites in Frontpage about 3 years ago, progressed to ASP, Linux/Mysql, and PHP/MYSQL, currently learning LDAP, XML, XHTML, ASP.net, learning more about css, worked in Hammersmith Hospital for 8 years, Developed

www.hammersmithresearch.com
www.cafenetix.com
www.hammersmithcafe.org

Also developed the Trusts Intranet site with lots of php/asp applications built in, content management, enjoy getting paid for mucking about with stuff I do as a hobby.

See All Postings From Bill Chalmers >>

Comments

Thank You !

July 19, 2002 by Doug R

Nice job Bill, thank you! How about another one? Mybe in combination with file upload.

Dot

RE: Thank You !

July 19, 2002 by Bill Chalmers
Thanks for the compliment, at present I am trying to find a good, free, asp only upload script, php is easily doable, but I want to integrate both asp and php upload into the editor, currently I am having no luck finding an asp script to do the upload.

Question about other fields

July 30, 2002 by Tolu Ayoola
I was just wondering if it is possible to use other form fields such as radio buttons, check boxes, and file fields in the RTE editor. By the way, this extension is awesome. thanks

RE: Question about other fields

July 30, 2002 by Bill Chalmers
That is what I am working on currently, adding different types of fields to the editor, I will update the extension when I have developed this, you can of course use different types outside of the editor, just not embedded currently.
See all 17 Comments

You must me logged in to write a comment.