Tutorial: Inserting and Updating Data

In this tutorial, you’ll continue working on the classified ads section of the Cosmopolitan Farmer Web site. You’ll work on two administrative pages that allow employees of Cosmopolitan Farmer to add new classified ads to the database and to edit ads already in the database.

This tutorial assumes you’ve already completed the tutorials for Chapters 21 and 22. If not, turn to page 621 and follow the instructions for preparing the application server, database, and Dreamweaver for this project. Then turn to page 670 and build the classified ad pages.

Adding an Insert Ad Page

Start by opening a page that’s already been created.

  1. Open the file named add_classifieds.asp in the admin folder of the local site you defined in Chapter 21 .

    Pages for adding and editing Cosmopolitan Farmer’s classified ads shouldn’t be accessible to the public; you wouldn’t want anyone adding ads without paying Cosmo Farmer. Accordingly, these pages are kept in a folder reserved for administrators of the Web site. (In the next chapter, you’ll learn how to password protect these pages.)


    ASP.NET Note

    ASP.NET developers can follow along using the ASP.NET server model. Open the ASPNET_add_classified.aspx file and follow the instructions that follow. Throughout this tutorial, Note boxes like this one will point out differences in the procedures between .NET and ASP.

    One piece of information required for each new ad is an ID number for the person who placed the classified. The database ...

Get Dreamweaver MX: The Missing Manual now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.