Insert / Update with 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
Started 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.
Comments
Thank You !
Nice job Bill, thank you! How about another one? Mybe in combination with file upload.
Dot
RE: Thank You !
Question about other fields
RE: Question about other fields
You must me logged in to write a comment.