Saturday, April 16, 2011

CREATE A CONTACT FORM IN DREAMWEAVER CS3 USING ASP

CREATE A CONTACT FORM IN DREAMWEAVER CS3 USING ASP

  • Create a new site in Dreamweaver CS 3. Save the new site in c:\inetpub\wwwroot\project.
  • Create a database in Access and save the database in the folder c:\inetpub\wwwroot\data. The database must save in MS Access 2002-2003 with .mdb file extension
  • create a table in database and create the following fields:
  1. name1
  2. username
  3. password
  4. remarks
  • 4. For remarks field, choose Memo as its data type.
  • 5. Then create connection in Dreamweaver CS3. Open the database panel, click at + button, select Custom Connection String. Enter a name for the connection as dmx. Enter the connection string as
"Driver={Microsoft Access Driver (*.mdb)};DBQ="& Server.MapPath("/data/guest.mdb").
  • Click the button Test to connect to the database and then click OK.

  • Create a new ASP VBScript page. Insert a form. Insert a table and insert the text and text field.
  • Give the name to the text field in Properties panel.
  • Save the page as daftar.asp in c:\inetpub\wwwroot\project
  • Then set the Insert Record to write data into database. Click Active Server Behaviors tab. Click the + button then select Insert Record, select the connection that you gad created then click ok. Save the file.
  • Create a new ASP VBScript page. Save the file as view.asp.
  • Create the text and text field for name, username, password and remarks.
  • Click Server Behaviors tab. Click the + button, select RecordSet. Select the connection that you had created. Select sort: name1 and Ascending to sort the data for viewing. Click Test.
  • Activate Bindings tab. Click + button select RecordSet. Click at + button sign in front of the RecordSet and you can see all the fields in the database.
  • Drag nama into cell 1 in column 2 in the table that you create in view.asp. drag other fields also into the following cell in column 2. Draw a line below the table. Next highlight the table including the line below the table. Click the + button on the panel, select Repeat Region. Click OK.
  • Open back your daftar.asp file. Double click Insert Record behavior in Server Behavior and add view.asp in After inserting go to: Click OK.
  • Click at Preview in Browser icon. Type any data and click save button. Automatically the view.asp file will be displayed and you can see the data that you typed.

0 comments:

Post a Comment

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | belt buckles